Avoiding try/catch hell in my web pages

Posted by Shaun_web on Stack Overflow See other posts from Stack Overflow or by Shaun_web
Published on 2010-05-31T20:53:55Z Indexed on 2010/05/31 21:03 UTC
Read the original article Hit count: 169

Filed under:
|
|
|

I am writing an ASP.NET website, which is a new framework for me. I find that I have a try/catch block in literally every method of my codebehind. All these try/catch blocks do is catch the exception and then pop-up an error message to the user. Isn't there some sort of global error handler in ASP.NET? It's worth noting that my error handling is within control (ASCX) pages, and I would like a way to simply get each ASCX to handle its own errors without forcing all error handling just to a single master page or a redirect...

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about error-handling