Provides data for the event that is raised when there is an exception that is not handled otherwise
There is a System.UnhandledExceptionEventArgs class, but that doesn't seem to be available in the Core CLR, therefore we redefine it here.
Inheritance: System.EventArgs
Beispiel #1
0
 /// <summary>
 /// This method gets fired when an unhandled excpetion occurs in <see cref="MainForm"/>.
 /// </summary>
 private static void MacLauncher_UnhandledException(object sender, Eto.UnhandledExceptionEventArgs e)
 {
     log.Error("An unhandled exception has occurred: \n*****Stack Trace*****\n\n" + e.ExceptionObject);
     Application.Instance.Invoke(() =>
     {
         MessageBox.Show(Language.Text.UnhandledException + "\n*****Stack Trace*****\n\n" + e.ExceptionObject, "Mac", MessageBoxType.Error);
     });
 }
Beispiel #2
0
 /// <summary>
 /// This method gets fired when an unhandled excpetion occurs in <see cref="MainForm"/>.
 /// </summary>
 private static void WinLauncher_UnhandledException(object sender, Eto.UnhandledExceptionEventArgs e)
 {
     log.Error("An unhandled exception has occurred: \n*****Stack Trace*****\n\n" + e.ExceptionObject);
     MessageBox.Show(Language.Text.UnhandledException + "\n*****Stack Trace*****\n\n" + e.ExceptionObject, "Microsoft .NET Framework", MessageBoxType.Error);
 }