public static void fireDeclaredCause ( Throwable t , Class ... declaredTypes ) { if ( t != null ) { Throwable cause = t . getCause ( ) ; if ( cause == null ) { cause = t ; } fireDeclared ( cause , declaredTypes ) ; } }
Throws the cause of the given exception if it is unchecked or an instance of any of the given declared types . Otherwise it is thrown as an UndeclaredThrowableException . If the cause is null then the original exception is thrown . This method only returns normally if the exception is null .