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).
精彩评论