Exemple #1
0
 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);
     }
 }
Exemple #2
0
 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);
     }
 }