如何判断是否被我捕获的Global.asax错误而显示在用户的屏幕上 [英] How to tell if an error captured by my global.asax was displayed on the screen of the user

查看:182
本文介绍了如何判断是否被我捕获的Global.asax错误而显示在用户的屏幕上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Global.asax文件我有一个小组的Application_Error(BYVAL发件人为对象,BYVALË作为EventArgs的),这应该捕捉应用程序(纠正我,如果我错了这里)经历了所有的错误。

In my Global.asax file I have a Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs) which "should" capture all errors experienced by the application (correct me if I'm wrong here).

我的问题是,我已经看到了记录错误,这显然没有在我看到的用户自定义错误页的术语故障。那么,什么会告诉我,如果有的话,异常的类型是否实际造成的自定义错误页显示。

My question is, I've seen errors recorded which apparently did not "fail" in terms of my users seeing the custom error page. So what would tell me, if anything, whether or not the type of exception actually caused the custom error page to show.

我想要得到的错误处理,并寻找任何见解或方法来改善用户的体验更好。谢谢!

I want to get better at error handling and looking for any insight or ways to improve the user's experience. Thanks!

推荐答案

在两个词:

处理所有的错误页面,并显示给用户什么是做的不对的消息。

Handle all your errors at the page, and show to the user a message for what is do wrong.

请未知的全局错误处理程序出错,请登录为他们在不久的将来解决这些问题,并显示一般的错误页面,您的用户。

Keep the global error handler for unknown to you errors, for log them and fix them in the near future, and show a general error page to your user.

有关更多的信息和细节我写这样的回答:<一href=\"http://stackoverflow.com/questions/10751363/how-do-i-make-a-generic-error-page-in-my-asp-net-application-so-that-it-handle/10751939#10751939\">How做我做一个&QUOT;一般性错误&QUOT;在我的ASP.NET应用程序页面,以便它处理服务于该页面本身触发时的错误?

For more informations and details I have write this answer: How do I make a "generic error" page in my ASP.NET application so that it handles errors triggered when serving that page itself?

这篇关于如何判断是否被我捕获的Global.asax错误而显示在用户的屏幕上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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