public static String buildMessage ( final String message , Throwable cause ) { if ( cause != null ) { cause = getRootCause ( cause ) ; StringBuilder buf = new StringBuilder ( ) ; if ( message != null ) { buf . append ( message ) . append ( "; " ) ; } buf . append ( "<--- " ) . append ( cause ) ; return buf . toString ( ) ; } else { return message ; } }
Build a message for the given base message and its cause .