Beispiel #1
0
        private static void OnThreadException(object sender, ThreadExceptionEventArgs e)
        {
            var exception = e.Exception;

            LoggingService.Global.Error(exception, "Application error");
            try
            {
                using (var dlg = new ExceptionDialog(exception))
                {
                    dlg.Run(null);
                }
            }
            catch
            {
            }
        }
Beispiel #2
0
        private static void OnUnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            var exc = e.ExceptionObject as Exception;

            if (exc != null)
            {
                LoggingService.Global.Error(exc, "Application error");
                try
                {
                    using (var dlg = new ExceptionDialog(exc))
                    {
                        dlg.Run(null);
                    }
                }
                catch
                {
                }
            }
            else
            {
                LoggingService.Global.Error("Unknown application error");
            }
        }