Error Message Text - Best Practices

2019-02-08 15:25发布

We are changing some of the text for our old, badly written error messages. What are some resources for best practices on writing good error messages (specifically for Windows XP/Vista).

12条回答
狗以群分
2楼-- · 2019-02-08 15:53

Support for multilanguage applies for all kinds of messages, but tends to be forgotten in the case of error messages.

查看更多
相关推荐>>
3楼-- · 2019-02-08 15:55

Try to figure out a way to write your software so it corrects the problem for them.

查看更多
手持菜刀,她持情操
4楼-- · 2019-02-08 15:57

The ultimate best practice is to prevent the user from causing errors in the first place.

Don't tell users anything they don't care about; error code 5064 doesn't mean a thing to anyone. Don't tell them they did something wrong; disallow it in the first place. Don't blame them, especially not for mistakes your software made. Above all, when there is a problem, tell them how to fix it so they can move on and get some work done.

查看更多
【Aperson】
5楼-- · 2019-02-08 15:58

For security reasons, don't provide internal system information that the user does not need.
Trivial example: when failing to login, don't tell the user if the username is wrong or the password is wrong; this will only help the attacker to brute force the system. Instead, just say "Username/Password combination is invalid" or something like that.

查看更多
走好不送
6楼-- · 2019-02-08 15:59
  1. Avoid identical error messages coming from different places; parametrize with file:line if possible, or use other context that lets you, the developer, uniquely identify where the error occurred.
  2. Design the mechanism to allow easy localization, especially if it is a commercial product.
  3. If the error messages are user-visible, make them complete, meaningful sentences that don't assume intimate knowledge of the code; remember, you're always too close to the problem -- the user is not. If possible, give the user guidance on how to proceed, who to contact, etc.
  4. Every error should have a message if possible; if not, then try and make sure that all error-unwind paths eventually reach an error message that sheds light on what happened.

    I'm sure there will be other good answers here...
查看更多
Root(大扎)
7楼-- · 2019-02-08 16:00

In terms of wording your error messages, I recommend referring to the following style guides for Windows applications:

查看更多
登录 后发表回答