public static Throwable getInitialCause ( final Throwable throwable ) { if ( throwable == null ) { new FatalImplementationErrorException ( ExceptionProcessor . class , new NotAvailableException ( "cause" ) ) ; } Throwable cause = throwable ; while ( cause . getCause ( ) != null ) { cause = cause . getCause ( ) ; } return cause ; }
Method returns the initial cause of the given throwable .