开发者

Creating a Project Without Using a Single TRY-CATCH exception handling

开发者 https://www.devze.com 2023-02-10 07:23 出处:网络
I want to centralize error handling by avoiding the messy t开发者_JS百科ry-catch blocks, I explored the global.asax and I notice

I want to centralize error handling by avoiding the messy t开发者_JS百科ry-catch blocks, I explored the global.asax and I notice that every error occur in the application domain goes to the Application_Error block, so my question is, is this really possible? is all the possible error goes throug global.asax Application_Error block?

Thanks in advance.


Yes, this is not only possible, but done in many web applications as a catch all location for unhandled exceptions.

See this article on 15seconds (a bit old, but still relevant).

0

精彩评论

暂无评论...
验证码 换一张
取 消