Errors description guideline
Is there any guideline to classify and describe errors开发者_StackOverflow中文版 that a program throws? I'm talking about errors that I define in the code.
I've read that error description should be as specific as possible, but I was looking for some more rigid guideline of good practices on the topic.
Any hint apprecciated.
Thanks.
I know that this question is marked with "language-agnostic", but it depends a lot on the langauge that you are using in that you should follow the patterns and practices most commonly used in that language (and therefore most familiar to developers).
For example, read Error Raising and Handling Guidelines (MSDN) for some Microsoft .Net exception handling guidelines. (which I've just noticed are actually out of date, for example it recommends inheriting from ApplicationException
).
精彩评论