public String getMessageAndLocation ( ) { StringBuilder sbuffer = new StringBuilder ( ) ; String message = super . getMessage ( ) ; if ( null != message ) { sbuffer . append ( message ) ; } if ( null != locator ) { String systemID = locator . getSystemId ( ) ; int line = locator . getLineNumber ( ) ; int column = locator . getColumnNumber ( ) ; if ( null != systemID ) { sbuffer . append ( "; SystemID: " ) ; sbuffer . append ( systemID ) ; } if ( 0 != line ) { sbuffer . append ( "; Line#: " ) ; sbuffer . append ( line ) ; } if ( 0 != column ) { sbuffer . append ( "; Column#: " ) ; sbuffer . append ( column ) ; } } return sbuffer . toString ( ) ; }
Get the error message with location information appended .