I am trying in design a watertight exception handling strategy for an MVC application in which we use Elmah for logging unhandled exceptions. I would like some critique on some of my thoughts.
- All application exceptions should be handled in the controller layer. Any unhandled exception below that layer should be the result of a request from a controller.
- In the controllers, a developer can handle certain errors with user popups etc. with optional logging to Elmah.
- In the controllers, for unhandled errors, I can use a custom HandleError attribute to decide whether to just let Elmah log the error, or to also then proceed to the Error view.
Sound OK? Anything serious missing?