public String getMessage ( ) { if ( this . cause == null ) { return super . getMessage ( ) + " Line number: " + this . lineNumber ; } else { return super . getMessage ( ) + " Line number: " + this . lineNumber + ". Caused by: " + this . cause . getMessage ( ) ; } }
This will print out a summary including the line number . It will also print out the cause message if applicable .