public void setErrorMessage ( Throwable exception ) { if ( exception != null ) { String message = exception . getLocalizedMessage ( ) ; if ( Strings . isNullOrEmpty ( message ) ) { message = exception . getMessage ( ) ; } if ( Strings . isNullOrEmpty ( message ) ) { message = MessageFormat . format ( Messages . SREsPreferencePage_9 , exception . getClass ( ) . getName ( ) ) ; } setErrorMessage ( message ) ; } }
Set the error message from the given exception .