예제 #1
0
        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);
        }
예제 #2
0
        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);
        }