Error Message Text - Best Practices

前端 未结 12 869
北恋
北恋 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: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.

提交回复
热议问题