Esempio n. 1
0
        private void Application_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
        {
            // For the GUI thread exception handling only, check if there's a crash logger available,
            //  because we will have prevented it from seeing the AppDomain.CurrentDomain.UnhandledException event.
            if (CrashLogger != null)
            {
                CrashLogger.LogException(e.Exception);
            }

            ShowExceptionDialog(e.Exception);
            e.Handled = true;
        }
        private void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
        {
            Exception exception = e.Exception;

            // For the GUI thread exception handling only, check if there's a crash logger available,
            //  because we will have prevented it from seeing the AppDomain.CurrentDomain.UnhandledException event.
            if (CrashLogger != null)
            {
                CrashLogger.LogException(exception);
            }

            ShowExceptionDialog(exception);
        }