public static void RaiseUnhandledException(Exception e, bool is_terminal) { if (UnhandledException == null) { Console.Error.WriteLine("Exception in Gtk# callback delegate"); Console.Error.WriteLine(" Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception."); Console.Error.WriteLine(e); Console.Error.WriteLine(new System.Diagnostics.StackTrace(true)); Environment.Exit(1); } UnhandledExceptionArgs args = new UnhandledExceptionArgs(e, is_terminal); try { UnhandledException(args); } catch (Exception ex) { Console.Error.WriteLine(ex); Environment.Exit(1); } if (is_terminal || args.ExitApplication) { Environment.Exit(1); } }
static void OnException(UnhandledExceptionArgs args) { //MessageDialog md = new MessageDialog(null, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, args.ExceptionObject.ToString()); MessageDialog md = new MessageDialog(null, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, "Hiba történt!"); md.Run(); md.Destroy(); }
private static void OnUnhandledException(UnhandledExceptionArgs args) { Log.Fatal("Unhandled Exception.", (Exception) args.ExceptionObject); Console.WriteLine("Fatal Error: {0} ... {1}", args.ExceptionObject, args.IsTerminating); MessageBox.Show(new FatalErrorWindow(), "Unhandled exception.\n" + "Please raise an issue on the Support website.", ButtonsType.Ok, MessageType.Error); args.ExitApplication = true; }
static void OnException(GLib.UnhandledExceptionArgs args) { string errorMsg = "An application error occurred. Please contact the adminstrator " + "with the following information:\n\n"; errorMsg = errorMsg + args.ExceptionObject.ToString() + "\n"; MessageBox.Show(errorMsg, "Glib error error {0}", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Stop); System.Diagnostics.Debug.WriteLine(errorMsg); args.ExitApplication = false; }
private static void HandleUnhandledException(UnhandledExceptionArgs e) { Exception ex = e.ExceptionObject as Exception; string message = ex == null ? e.ExceptionObject.ToString() : ex.ToString(); string title = "Unhandled exception"; DialogFlags flags = DialogFlags.Modal | DialogFlags.DestroyWithParent; Dialog dialog = new Dialog(title, MainWindow, flags); Label label = new Label(message); VBox vBox = (VBox)dialog.Child; vBox.Add(label); dialog.ShowAll(); e.ExitApplication = false; }
void HandleExceptionManagerUnhandledException(UnhandledExceptionArgs args) { Exception ex = (Exception)args.ExceptionObject; Console.WriteLine("Unhandled Exception: {0}", ex.GetType ().ToString ()); Console.WriteLine("\t{0}", ex.Message); Console.WriteLine("\t{0}", ex.Source); Console.WriteLine("\t{0}", ex.StackTrace); MessageDialog d = new MessageDialog (null, DialogFlags.Modal, MessageType.Error, ButtonsType.Close, true, "<b>{0}</b>: {1} at <i>{2}</i>", ex.GetType ().ToString(), ex.Message, ex.Source); d.Run (); d.Hide (); d.Dispose (); args.ExitApplication = true; }
private void unhandledException_event(GLib.UnhandledExceptionArgs args) { Finish(); Exception theProblem = args.ExceptionObject as Exception; string theError; if (theProblem != null) { string theLocalizable = Catalog.GetString("Chrono Marker is crashing due to the following error \"{0}\""); theError = string.Format(theLocalizable, theProblem); } else { theError = Catalog.GetString("Chrono Marker is crashing due to an unknown error."); } ShowError(null, theError); }
public static void RaiseUnhandledException (Exception e, bool is_terminal) { if (UnhandledException == null) { Console.Error.WriteLine ("Exception in Gtk# callback delegate"); Console.Error.WriteLine (" Note: Applications can use GLib.ExceptionManager.UnhandledException to handle the exception."); Console.Error.WriteLine (e); Console.Error.WriteLine (new System.Diagnostics.StackTrace (true)); Environment.Exit (1); } UnhandledExceptionArgs args = new UnhandledExceptionArgs (e, is_terminal); try { UnhandledException (args); } catch (Exception ex) { Console.Error.WriteLine (ex); Environment.Exit (1); } if (is_terminal || args.ExitApplication) Environment.Exit (1); }
protected void OnExceptionEvent(UnhandledExceptionArgs u) { Exception e = u.ExceptionObject as Exception; Logger.ErrorFormat(this, "Unhandled Exception: {0}", e.Message); }
public void HandleException(GLib.UnhandledExceptionArgs args) { Console.Error.WriteLine(String.Format("Exception: {0}", args.ExceptionObject.ToString())); }
/* Event members */ private static void OnUnhandledException (UnhandledExceptionArgs args) { if (args.ExceptionObject is Exception) BugReporter.Report(args.ExceptionObject as Exception); Kill(); }
void OnUnhandledException(UnhandledExceptionArgs args) { Console.WriteLine(args.ExceptionObject); }
private static void ExceptionManager_UnhandledException(UnhandledExceptionArgs args) { LogManager.GetLogger(typeof (Program)).Fatal(string.Format("Unhandled error {0}", args.ExceptionObject), args.ExceptionObject as Exception); }