A good error message should say:
- What the program was trying to do.
- What it expected to have happen.
- What actually happened.
$ perl -e 'die'
Died at -e line 1.
The more difficult thing, surprisingly, is knowing what errors to report. Most system errors should be reported, but not if the code tries to work around the problem.
No comments:
Post a Comment