The question title may not be correct.
I have worked in a very big ASP.NET web application (without using MVC), there I used a simple error handling strategy :
- Enclose every statement in try..catch block
- Have a error label on each page at the very top
- If any exception occurs then show the error description on the Error Label.
Now I am switching to a new project where MVC 3 framework is to be used, so I came across ELMAH. It is indeed a nice tool for error handling and logging. But as I read from many sites, it basically logs unhandled exceptions.
If I use the same strategy that every statement in try..catch block and then show the error message on the page at the top, then where does ELMAH sit, how will it log the exception? Which exception will it log if I am not putting a single statement outside try..catch block. So there is no scope for the unhandled exception.