void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { ShowUnhandledExceptionDialog((Exception)e.ExceptionObject); } void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e)