This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I don't understand what type the exception below is. I can print it out which makes me think of the exception as a string. However, if I try to save it to a string, I get the following compilation error:
Or Both can be what you want depending on what you want to be in the String exactly. The String returned by toString() includes the exception's class name and the message, unless it's null. getMessage() only returns the message, and that can be null.