private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { string exceptionText = EnvironmentInfo.BuildReport(e.Exception); LOG.Error(exceptionText); new BugReportForm(exceptionText).ShowDialog(); }
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { string exceptionText = EnvironmentInfo.BuildReport(e.ExceptionObject as Exception); LOG.Error(exceptionText); new BugReportForm(exceptionText).ShowDialog(); }
public ErrorWindow(Exception e) { InitializeComponent(); this.Title = "Unexpected Error in GreenshotLanguageEditor"; this.textBox.Text = "Sorry, an unexpected error occurred :(\n\n" + EnvironmentInfo.BuildReport(e); }
public BugReportWindow(Exception exception) { ExceptionText = EnvironmentInfo.BuildReport(exception); LOG.Error(EnvironmentInfo.ExceptionToString(exception)); InitializeComponent(); this.DataContext = this; }
public JiraPlugin() { _instance = this; // Added to prevent Greenshot from shutting down when there was an exception in a Task TaskScheduler.UnobservedTaskException += (sender, args) => { try { Exception exceptionToLog = args.Exception; string exceptionText = EnvironmentInfo.BuildReport(exceptionToLog); Log.Error("Exception caught in the UnobservedTaskException handler."); Log.Error(exceptionText); new BugReportForm(exceptionText).ShowDialog(); } finally { args.SetObserved(); } }; }