A good error message should contain the following:
Short description
What triggered the error?
What was expected?
Example: User inputs a negative value (-5) into a function foo that only accepts positive integers. A message similar to the following should be displayed:
Negative input!
The input value was -5. Function foo only accepts positive integers.
No comments:
Post a Comment