private void ReplaceErrorHandler() { Filter filter = GlobalFilters.Filters.FirstOrDefault(f => f.Instance is IExceptionFilter); var handler = new ExceptionlessHandleErrorAttribute(); if (filter != null) { if (filter.Instance is ExceptionlessHandleErrorAttribute) return; GlobalFilters.Filters.Remove(filter.Instance); handler.WrappedHandler = (IExceptionFilter)filter.Instance; } GlobalFilters.Filters.Add(handler); }
private void ReplaceErrorHandler() { Filter filter = GlobalFilters.Filters.FirstOrDefault(f => f.Instance is IExceptionFilter); var handler = new ExceptionlessHandleErrorAttribute(); if (filter != null) { if (filter.Instance is ExceptionlessHandleErrorAttribute) { return; } GlobalFilters.Filters.Remove(filter.Instance); handler.WrappedHandler = (IExceptionFilter)filter.Instance; } GlobalFilters.Filters.Add(handler); }