- Apologise.
- Say what went wrong.
- Say how to resolve it.
- Be polite.
- The message should be worded so that the application accepts responsibility for the problem. Never blame or criticize the user or make them think it's their fault.
Example:
"Sorry, the file could not be opened. Please check that the file is not already opened by another program and try again."
If there are additional details that would scare the user such as an error number or something else only a developer would understand, don't show them. Write them to a log file, or have a details button that can be pressed to get to them.
I'm assuming you're talking about showing error messages to users in message boxes or on screen.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…