一个人如何编写好的错误消息? [英] How does one write good error messages?

查看:95
本文介绍了一个人如何编写好的错误消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尽管这更多的是书面语言问题,而不是编码问题,但这是程序员在客户或其他人未提供副本的情况下必须做的事情。不管是好是坏,都会出现任何错误消息的例子。

While this is more of a written language issue than a coding one, it is something that programmers must do in circumstances where copy is not provided by a client or someone else. Any examples of error messages, good or bad, are welcome to make the point.

我短暂地搜索了一下,但找不到重复线程。好吧,来吧。谢谢大家。

I briefly searched and could not find a dupe thread. Ok, have at it. Thanks, all.

推荐答案


  • 道歉。

  • 说出了什么问题。

  • 说出解决办法。

  • 要礼貌。

  • 消息应该是措词,以便应用程序对此问题承担责任。永远不要责怪或批评用户,也不要让用户认为这是他们的错。

    • 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.

      这篇关于一个人如何编写好的错误消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆