Tomas Votruba shares the “7 Tips to Write Exceptions Everyone Will Love“. These all make a lot of sense and are generic enough to be applicable to any programming language (that implements exceptions). The list of tips is as follows:
- Make Exception Names for Humans
- Use Quotes Around Statements
- What Exactly is Wrong?
- What is The Wrong Value?
- What File Exactly is Broken?
- What Options do I have?
- Link what You can’t Fit 140 Chars
Read the full article for both good and bad examples, as well as the explanations of the above.