/// <summary> /// Activate our automatic detection of unhandled exceptions. /// </summary> /// <param name="configurator">config class</param> /// <remarks> /// <para>Adds context collectecors for forms, query string, sessions, user agent and http headers.</para> /// <para> /// MVC exceptions are dected through a custom global error filter. /// </para> /// </remarks> public static void CatchMvcExceptions(this OneTrueConfiguration configurator) { configurator.ContextProviders.Add(new FormProvider()); configurator.ContextProviders.Add(new QueryStringProvider()); configurator.ContextProviders.Add(new SessionProvider()); configurator.ContextProviders.Add(new HttpHeadersProvider()); GlobalFilters.Filters.Add(new OneTrueErrorFilter()); ErrorHttpModule.Activate(); }
/// <summary> /// Activate our automatic detection of unhandled exceptions. /// </summary> /// <param name="configurator">configuration class</param> /// <remarks> /// <para>Adds context collectors for forms, query string, sessions, user agent and http headers.</para> /// <para> /// MVC exceptions are detected through a custom global error filter. /// </para> /// </remarks> public static void CatchMvcExceptions(this CoderrConfiguration configurator) { configurator.ContextProviders.Add(new FormProvider()); configurator.ContextProviders.Add(new FileProvider()); configurator.ContextProviders.Add(new QueryStringProvider()); configurator.ContextProviders.Add(new SessionProvider()); configurator.ContextProviders.Add(new HttpHeadersProvider()); configurator.ContextProviders.Add(new HttpApplicationItemsProvider()); configurator.ContextProviders.Add(new ViewDataProvider()); configurator.ContextProviders.Add(new ViewBagProvider()); configurator.ContextProviders.Add(new RouteDataProvider()); configurator.ContextProviders.Add(new TempDataProvider()); configurator.ContextProviders.Add(new ModelStateProvider()); configurator.ContextProviders.Add(new ModelProvider()); GlobalFilters.Filters.Add(new CoderrFilter()); ErrorHttpModule.Activate(); }