Aplication_Error事件未触发aspx页中的已处理错误. [英] Aplication_Error Event not firing for handled error in aspx page.
问题描述
大家好,
我正在Global.asax文件的Application_error事件的帮助下为许多应用程序开发全局错误处理模块.
当我们不处理aspx.cs页面中的异常时,它的Application_error可以正常工作.但是,如果我们在页面标签上处理异常,则不会触发Application_error事件.
如果我们使用throw in catch块可以正常工作.但是我不想在任何情况下都使用throw关键字,因为我们有许多运行中的应用程序带有"throw:keyword.
我有BLL和DLL class.BLL类函数,从Global类的Application_error事件调用.我只想对所有应用程序使用这些类和Application_error事件代码.
请建议我在仅使用try和catch处理页面标签处的异常时如何调用Application_error.
Hi All,
I am developing global error handling module for many application with help of Application_error event of Global.asax file.
Its Application_error working fine when we doesn''t handle exception in aspx.cs page.But if we handle exception at page label the Application_error event not firing.
if we use throw in catch block its working fine.But I do not want to use throw keyword in any condition because we have many running application with "throw: keyword.
I have BLL and DLL class.BLL class functions calling from Application_error event of Global class. I just want to use these classes and Application_error event code to all application.
Please suggest me how to call the Application_error when we handle exception at page label with only try and catch.
推荐答案
基本上是Try..Catch用于捕获在页面上发生的捕获的本地异常.意外的执行由Global.asax处理.
这是一个很好的链接,很好地解释了 Application_error vs try catch [ ^ ]
Basically Try..Catch for caught local exception occoured on page. uncought execptions are handeled by Global.asax.
here is good link to explain well, Application_error vs try catch[^]
请避免发表我的最后一篇文章.这是正确的问题.
大家好,
我正在Global.asax文件的Application_error事件的帮助下为许多应用程序开发全局错误处理模块.
当我们不处理aspx.cs页面中的异常时,它的Application_error可以正常工作.但是,如果我们在页面标签上处理异常,则不会触发Application_error事件.
如果我们使用throw in catch块可以正常工作.但是我不想在任何情况下都使用throw关键字,因为我们有许多运行中的应用程序都没有"throw"关键字.
我有BLL和DLL class.BLL类函数,从Global类的Application_error事件调用.我只想对所有应用程序使用这些类和Application_error事件代码.
请建议我在仅使用try和catch处理页面标签上的异常时如何调用Application_error.
Please Avoid my last post. This is correct question.
Hi All,
I am developing global error handling module for many application with help of Application_error event of Global.asax file.
Its Application_error working fine when we doesn''t handle exception in aspx.cs page.But if we handle exception at page label the Application_error event not firing.
if we use throw in catch block its working fine.But I do not want to use throw keyword in any condition because we have many running application without "throw" keyword.
I have BLL and DLL class.BLL class functions calling from Application_error event of Global class. I just want to use these classes and Application_error event code to all application.
Please suggest me how to call the Application_error when we handle exception at page label with only try and catch.
这篇关于Aplication_Error事件未触发aspx页中的已处理错误.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!