public void ifExceptionThrow ( ) throws Exception { if ( nested == null || nested . isEmpty ( ) ) { return ; } if ( nested . size ( ) == 1 ) { Throwable th = nested . get ( 0 ) ; if ( th instanceof Error ) { throw ( Error ) th ; } if ( th instanceof Exception ) { throw ( Exception ) th ; } } throw this ; }
Throw a MultiException . If this multi exception is empty then no action is taken . If it contains a single exception that is thrown otherwise the this multi exception is thrown .