Exceptions Speak about the Context they are Thrown From

Programmers often make the mistake of assuming that an exception being caught will be an exception that they have seen during testing.  Programmers often underestimate the large variety of exceptions that might occur.  Based on this misunderstanding, programmers will make poor assumptions about what exceptional situation might be occurring, and then jump to an invalid conclusion about the problem the code has encountered, and as a result produce a poor, inaccurate error message. This can easily be avoided if you understand proper usage of exceptions. Continue reading

The Purpose of Error Reporting

Error messages are part of every user experience, but too often these messages are poor, cryptic, and insulting.   Too often programmers do a half-hearted attempt at writing error messages, mostly because they mistakenly assume that users will never see them.  Too often programmers misunderstand the potential that results from writing correct error message.  Error messages can be the key to usability.  Error messages can help train users, and guide administrator.  All you have to do is understand the purpose of error reporting. Continue reading