示例#1
0
 public static void HandleFatalException(Exception e)
 {
     Talk.Fatal("No joke. The app crashed successfully!");
     Talk.Fatal("If you want to know why -> pelase press 'y' -> othervise press anything you like.");
     switch (Console.ReadKey(true).Key)
     {
     case ConsoleKey.Y:
     {
         Talk.Fatal("Error message: " + e.Message);
         Talk.Fatal("Stacktrace:" + e.StackTrace);
         break;
     }
     }
     Talk.Info("If you think this is no big deal -> please press 'y' to continue.. or any other key to restart the app.");
     if (Console.ReadKey().Key == ConsoleKey.Y)
     {
         return;
     }
     Cmd.RestartProcess(false);
 }