예제 #1
0
        private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
        {
            string exceptionText = EnvironmentInfo.BuildReport(e.Exception);

            LOG.Error(exceptionText);
            new BugReportForm(exceptionText).ShowDialog();
        }
예제 #2
0
        private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            string exceptionText = EnvironmentInfo.BuildReport(e.ExceptionObject as Exception);

            LOG.Error(exceptionText);
            new BugReportForm(exceptionText).ShowDialog();
        }
예제 #3
0
        public ErrorWindow(Exception e)
        {
            InitializeComponent();
            this.Title = "Unexpected Error in GreenshotLanguageEditor";

            this.textBox.Text = "Sorry, an unexpected error occurred :(\n\n"
                                + EnvironmentInfo.BuildReport(e);
        }
예제 #4
0
        public BugReportWindow(Exception exception)
        {
            ExceptionText = EnvironmentInfo.BuildReport(exception);
            LOG.Error(EnvironmentInfo.ExceptionToString(exception));

            InitializeComponent();
            this.DataContext = this;
        }
예제 #5
0
 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();
         }
     };
 }