If you do only eight things
Design your program for error handling.
Don't give unnecessary error messages.
Avoid user confusion by giving necessary error messages.
Make sure the error message gives a problem, cause, and solution.
Make sure the error message is relevant, actionable, brief, clear, specific, courteous, and rare.
Design error messages from the user's point of view, not the program's point of view.
Avoid involving the user in troubleshooting—use a different error message for each detectable cause.
Use the lightest weight presentation method that does the job well.