Tuesday, January 6, 2009

When Bad Error Messages Attack!

When considering how you should display error messages to your users, try to shy away from error messages like this:
There was an error connecting to the database. Please try playing the game again later, or right now.
Not the best, most informative message, but hey, at least we get a choice, right?

Quality error messages (or lack thereof) seem to really separate polished applications from those that are a bit hackish, when you using various sites on the web. It's the kind of thing that's a real pain in the ass to fix after the fact, so start out with good, informative messages, and a good framework to handle logging and error notification. This means "don't pipe your errors to System.out". When you do that, you end up with 64GB catalina.out files that aren't rotated. While disk space is cheap, it's not THAT cheap.

* These pieces of advice are not meant in any way to convey the illusion that the author of this blog has never made any of these mistakes (except the wack error message).
blog comments powered by Disqus