public String getMessage ( Throwable exception ) { String message ; if ( getExceptionToMessage ( ) != null ) { message = getExceptionToMessage ( ) . get ( exception . getClass ( ) ) ; if ( StringUtils . hasText ( message ) ) { return message ; } // map entry with a null value if ( getExceptionToMessage ( ) . containsKey ( exception . getClass ( ) ) ) { return exception . getMessage ( ) ; } } if ( isSendExceptionMessage ( ) ) { return exception . getMessage ( ) ; } return getDefaultExceptionMessage ( ) ; }
Returns an error message for the supplied exception and based on this configuration .