private void Application_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) { ExceptionWriter.WriteAndShowLog(e.Exception); e.Handled = true; Shutdown(); }
private void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs e) { if (e.ExceptionObject is Exception exception) { ExceptionWriter.WriteAndShowLog(exception.InnerException); } }
private void TaskSchedulerOnUnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e) { ExceptionWriter.WriteAndShowLog(e.Exception.InnerException); e.SetObserved(); }