title: What kind of exceptions will be caught by Microsoft.Owin.Diagnostics.ErrorPageExtensions.UserErrorPage
body: <p>I got the demo code from <a href="http://blogs.msdn.com/b/webdev/archive/2013/11/22/debugging-owin-app-or-framework.aspx" rel="noreferrer">http://blogs.msdn.com/b/webdev/archive/2013/11/22/debugging-owin-app-or-framework.aspx</a> , and it shows a sexy error page.</p>
  
  <pre><code>app.UseErrorPage(new ErrorPageOptions()
          {
              //Shows the OWIN environment dictionary keys and values. This detail is enabled by default if you are running your app from VS unless disabled in code. 
              ShowEnvironment = true,
              //Hides cookie details
              ShowCookies = false, 
              //Shows the lines of code throwing this exception. This detail is enabled by default if you are running your app from VS unless disabled in code. 
   ShowSourceCode = true,
              });
  
              app.Run(async context =&gt;
              {
                 throw new Exception("UseErrorPage() demo");
                 await context.Response.WriteAsync("Error page demo");
              });
          }
  </code></pre>
  
  <p>However, if I throw a exception in a Controller action, the error page will not shown, and I still see the YSOD.</p>
  
  <p>So I want to know what exceptions will be caught by UseErrorPage? Do I need additional configurations to make it works?</p>