Exemplo n.º 1
0
        public static void Fatal(string message)
        {
            if (_loggerService == null)
            {
                return;
            }

            _loggerService.Fatal(message);
        }
Exemplo n.º 2
0
 public void Fatal(string format, params object[] param)
 {
     if ((_enabled & LoggerEventTypes.Fatal) > 0)
     {
         _logger.Fatal(format, param);
     }
 }
        public override bool HandleException(string source, Exception exception)
        {
            var message = $"Unexpected critical exception - {source}";

            loggerService.Fatal(exception, message);
            appDialogsService.ShowCriticalException(exception, message);
            return(true);
        }
        public override bool HandleException(string source, Exception exception)
        {
            var message = "Fatal exception source: " + source + ". Exception message: ";

            loggingService.Fatal(exception, message);
            dialogService.ShowCriticalException(message, exception);
            return(true);
        }
Exemplo n.º 5
0
        protected override void OnException(ExceptionContext filterContext)
        {
            var exception = filterContext.Exception;

            logger.Fatal(exception);

            var controller = (string)filterContext.RouteData.Values["controller"];
            var action     = (string)filterContext.RouteData.Values["action"];

            filterContext.Result = new PartialViewResult()
            {
                ViewName = MVC.Shared.Views._Error,
                ViewData = new ViewDataDictionary <HandleErrorInfo>(new HandleErrorInfo(exception, controller, action))
            };

            filterContext.ExceptionHandled = true;
            base.OnException(filterContext);
        }