private void UnhandledException(object sender, UnhandledExceptionEventArgs e) { try { File.AppendAllText(AppDataFolder.GetPath("FatalError.txt"), DateTime.Now.ToString() + " - FATAL ERROR AppDomain - UnhandledException (by " + sender + " : " + e.ExceptionObject + "\n\n\n"); } catch { MessageBox.Show("Une erreur importante est survenue !\n" + e); } }
private void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e) { try { File.AppendAllText(AppDataFolder.GetPath("FatalError.txt"), DateTime.Now.ToString() + " - FATAL ERROR TaskScheduler - UnobservedTaskException (by " + sender + " : " + e.Exception + "\n\n\n"); } catch { MessageBox.Show("Une erreur importante est survenue !\n" + e); } }