Blacker.MangaScraper.App.AppDispatcherUnhandledException C# (CSharp) Метод

AppDispatcherUnhandledException() приватный Метод

private AppDispatcherUnhandledException ( object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e ) : void
sender object
e System.Windows.Threading.DispatcherUnhandledExceptionEventArgs
Результат void
        void AppDispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
        {
            //process exception
            #if !DEBUG
            MessageBox.Show("Application encountered following unrecoverable error and will now shut down:\n\n\"" + e.Exception.Message + "\"", "Error", MessageBoxButton.OK, MessageBoxImage.Error);

            _log.Error("Unexpected error.", e.Exception);

            e.Handled = true;

            // kill application
            this.MainWindow.Close();
            #endif
        }