public static String getInitialCauseMessage ( final Throwable throwable ) { final Throwable cause = getInitialCause ( throwable ) ; if ( cause . getLocalizedMessage ( ) == null ) { return cause . getClass ( ) . getSimpleName ( ) ; } return cause . getLocalizedMessage ( ) ; }
Method returns the message of the initial cause of the given throwable . If the throwable does not provide a message its class name is returned .