title: Redirect from exception filter
body: <p>I'm using ASP.NET Core. One of my controllers calls into services which throw various exceptions. I want to handle them in an exception filter (not middleware).</p>
  
  <pre><code>public class MyHandlerAttribute : ExceptionFilterAttribute
  {
      public override void OnException(ExceptionContext c)
      {
        if (c.Exception is FooException) {
            // redirect with arguments to here
        } 
        else if (c.Exception is FooException) {
            // redirect with arguments to there
        }
        else {
            // redirect to main error action without arguments, as 500
        }
        base.OnException(c);
      }
  }
  </code></pre>
  
  <p>Unlike action filters, an exception filter doesn't give me access to the <code>Controller</code>, so I can't do a <code>c.Result = controller.RedirectTo...()</code>.</p>
  
  <p>So how do I redirect to my error action?</p>