private static Throwable findRootCause ( Throwable t ) { Throwable root = t ; Throwable cause = root . getCause ( ) ; while ( cause != null ) { root = cause ; cause = root . getCause ( ) ; } return root ; }
Find root cause of a specified Throwable object .