private Throwable getCause ( Throwable t ) { Throwable cause = t . getCause ( ) ; if ( t . getCause ( ) != null ) { return cause ; } else { return t ; } }
get if cause exists else return the original exception