Open kolchy opened 9 years ago
When I try to throw an exception that I want Raygun to pick up, I get:
Specified method is not supported.
I'm just doing:
throw new InvalidCastException("ex");
I've setup the filter as per the instructions for WebApi:
public class OwinRequestExceptionLoggerAttribute : ExceptionFilterAttribute { public override void OnException(HttpActionExecutedContext actionExecutedContext) { var owinContext = actionExecutedContext.ActionContext.Request.GetOwinContext(); owinContext.Set("webapi.exception", actionExecutedContext.Exception); Elmah.ErrorLog.GetDefault(HttpContext.Current).Log(new Elmah.Error(actionExecutedContext.Exception)); } }
When I try to throw an exception that I want Raygun to pick up, I get:
Specified method is not supported.
I'm just doing:
throw new InvalidCastException("ex");
I've setup the filter as per the instructions for WebApi:
public class OwinRequestExceptionLoggerAttribute : ExceptionFilterAttribute { public override void OnException(HttpActionExecutedContext actionExecutedContext) { var owinContext = actionExecutedContext.ActionContext.Request.GetOwinContext(); owinContext.Set("webapi.exception", actionExecutedContext.Exception); Elmah.ErrorLog.GetDefault(HttpContext.Current).Log(new Elmah.Error(actionExecutedContext.Exception)); } }