Error Message Text - Best Practices

前端 未结 12 765
北恋
北恋 2021-01-02 03:22

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 Wind

相关标签:
12条回答
  • 2021-01-02 04:00

    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.

    0 讨论(0)
  • 2021-01-02 04:03

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

    0 讨论(0)
  • 2021-01-02 04:03

    I would second not telling the user useless esoteric information like numeric error codes. I would follow that up however by saying to definitely log that information for troubleshooting by more technically savvy people.

    0 讨论(0)
  • 2021-01-02 04:04

    Always include suggestions to Remedy the error.

    0 讨论(0)
  • 2021-01-02 04:06

    Shorter messages may actually be read.

    The longer your error message, the less the user will read. That being said, try to refactor the code so you can eliminate exceptions if there is an obvious response. Try to only have exceptions that happen based on things beyond your user or your code's control.

    The best exception message is the one you never have to display.

    0 讨论(0)
  • 2021-01-02 04:10

    Error handling is always better than error reporting, but since you are retrofitting the error messages and not necessarily the code here's a couple of suggestions:

    Users want solutions, not problems. Help them know what to do after an error, even if the message is as simple as "Please close the current window and retry your action."

    I am also a big fan of centralized logging of errors. Make sure the log is both human and computer scanable. Users don't always let you know what problems they are having, especially if they can be 'worked around', so the log can help you know what things need fixed.

    If you can control the error dialog easily, having a dialog which shows a nice, readable message with a 'details' button to show the error number, trace, etc. can be a big help for real-time problem solving as well.

    0 讨论(0)
提交回复
热议问题