||Best Practices for Exception Handling|
|Subject:||Exception messages best practices|
Thank you for this concise and well-considered article. The one thing that you didn't cover is how to handing error messages and make them relevant to both the programmer using the API and the end user. I've seen too many times when a user gets an ugly stack trace or a message that he/she can't figure out. Therefore an important 'exceptional best practice' is to make sure that the user interface gets and presents an understandable message to the user. A separate message should give the programmer using the API a clue what caused the problem. Proper naming of the exception can be an important clue for the programmer too. Do you have any comments as to your best practices in this area?