title: Global error handling (outside of controller) in ASP.NET MVC
body: <p>Let's say I put the following code somewhere in a Master page in my ASP.NET MVC site:</p>
  
  <pre><code>throw new ApplicationException("TEST");
  </code></pre>
  
  <p>Even with a [HandleError] attribute placed on my controller, this exception still bubbles up.  How can I deal with errors like this?  I would like to be able to route to an Error page and still be able to log the exception details.</p>
  
  <p>What is the best way to deal with something like this?</p>
  
  <p>Edit:  One solution I was considering would be to add a a new controller: UnhandledErrorController.  Can I put in an Application_Error method in Global.asax and then redirect to this controller (where it decides what to do with the exception)?</p>
  
  <p>Note: the defaultRedirect in the customErrors web.config element does not pass along the exception info.  </p>