private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { Console.Error.WriteLine(e.ExceptionObject); Application.Exit(); }