如果出现未处理的代码异常,向最终用户显示的最合适的内容是什么?

发布于 2024-07-13 10:16:52 字数 145 浏览 6 评论 0原文

在 Web 应用程序中,当您的服务器端代码出现问题并遇到未处理的异常时,告诉最终用户发生了什么情况的最合适方法是什么?
您是否只是简单地说“发生了一些意外的事情,我们很抱歉”。 您是否应该尝试了解异常是什么以及用户试图做什么,并让他们知道如何恢复(如果可能的话)?

In a web application, when your server side code screws up and experiences an unhandled exception, what is the most appropriate way to tell the end users of what happened?
Do you simply say "Something unexpected happened and we are sorry". Should you try to make some sense of what the exception was and what the user was trying to do and let them know how to recover, if at all thats possible?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

伪装你 2024-07-20 10:16:52

如果最终用户在交易过程中发生这种情况并且必须重新开始,他们会非常关心。 您应该尽可能尝试维护他们的客户端状态(即他们输入的表单值)。 如果您想让他们高兴,这可能是您最重要的考虑因素。

大多数最终用户不会欣赏关于他们发现你的错误是多么幸运的诙谐评论,事实上,这更有可能让他们非常恼火。 如果您想让您的用户报告错误(他们会这样做),那么向他们显示错误代码和简短描述,并让他们将其完整地传回给您。

在所有情况下,您都需要尽可能地向他们提供下一步该做什么的明确指示,例如“出现意外错误。请再次按发送”最好的指导是保持语言正式和简洁,您不需要需要很多的请和感谢,尽管这可能适合你的礼貌本性。 您希望信息简短、简洁、具有说教性,而不是闲聊。

End users will care a great deal if they are part way through a transaction when this happens and they have to start again. As far as possible you should try and maintain their client state (i.e. form values they have typed in). That's probably your most important consideration if you are looking to keep them happy.

Most end users will not appreciate a witty remark about how lucky they are to have found your bug, in fact it is more likely to greatly annoy them. If you want to use your users to report bugs (and they will do it) then show them an error code and short description and get them to pass it back to you in its entirety.

In all cases you need to try as far as possible to give them a clear instruction on what to do next e.g. "There has been an unexpected error. Press send again" Best guidance is to keep the language formal and concise, you don't need lots of please and thank you, although it may suit your polite nature. You want messages to be short, concise and didactic rather than chatty.

旧人九事 2024-07-20 10:16:52

Lynx 基于文本的浏览器有一条很好的消息,例如:恭喜,您在 Lynx 中发现了一个错误! 以下是提交错误报告的说明(主要是将日志文件发送到给定的电子邮件) 。

The Lynx text-based browser has a nice message, something like: Congratulations, you have found a bug in Lynx! Following are instructions for filing a bug report (mainly sending a log file to a given email).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文