// I don't think with Web API that this will ever be fired. public void OnException(ExceptionContext context) { if (context == null) { throw new ArgumentNullException("context"); } ServerErrorHelper.HandleApplicationError(context.HttpContext, _exceptionFormatter); }
protected void Application_Error(object sender, EventArgs e) { ServerErrorHelper.HandleApplicationError(new HttpContextWrapper(HttpContext.Current), ObjectFactory.GetInstance <IExceptionFormatter>()); }