예제 #1
0
 /// <summary>
 /// Shows the error report.
 /// </summary>
 /// <param name="message">Message to display with error.</param>
 /// <param name="ex">The exception.</param>        
 protected void ShowErrorReport(string message, Exception ex)
 {
     ExceptionReporter reporter = new ExceptionReporter();
     reporter.ReadConfig();
     reporter.Config.TitleText = "Oberon Crash Reporter";
     reporter.Show(message, ex);
 }
예제 #2
0
파일: Program.cs 프로젝트: Elof3/Treefrog
        private static void HandleException(Exception e)
        {
            if (CurrentProject != null)
            {
                if (!Directory.Exists("recovery"))
                    Directory.CreateDirectory("recovery");

                string filePath = "recovery/" + (CurrentProject.Name ?? "project.tlpx");
                using (FileStream fstr = File.OpenWrite(filePath))
                {
                    CurrentProject.Save(fstr, new FileProjectResolver(filePath));
                }
            }

            ExceptionReporter reporter = new ExceptionReporter();

            reporter.Config.ShowSysInfoTab = false;
            reporter.Config.ShowConfigTab = false;
            reporter.Config.EmailReportAddress = "*****@*****.**";
            reporter.Config.TitleText = "Treefrog Crash";
            reporter.Config.UserExplanationLabel = "Enter a brief description leading up to the crash.  Your project has been saved to /recovery.";

            reporter.Show(e);

            Application.Exit();
        }
예제 #3
0
        private static void ThreadException(object sender, ThreadExceptionEventArgs e) {
            log.Fatal("Unhandled thread exception.", e.Exception);
            FlushLogBuffers();

            Properties.Settings.Default.Crashed = true;
            Properties.Settings.Default.Save();

            ExceptionReporter reporter = new ExceptionReporter();
            reporter.Show(e.Exception);
        }
예제 #4
0
        private static void UnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
 	        log.Fatal("Unhandled exception to toplevel.", (Exception)e.ExceptionObject);
            FlushLogBuffers();

            Properties.Settings.Default.Crashed = true;
            Properties.Settings.Default.Save();

            ExceptionReporter reporter = new ExceptionReporter();
            reporter.Show((Exception)e.ExceptionObject);
        }
예제 #5
0
        /// <summary>
        /// Handles the UnhandledException event of the Application control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Windows.Threading.DispatcherUnhandledExceptionEventArgs"/> instance containing the event data.</param>
        private void Application_UnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
        {
            if (System.Diagnostics.Debugger.IsAttached)
            {
                // an unhandled exception has occurred; break into the debugger
                System.Diagnostics.Debugger.Break();
            }

            ExceptionReporter reporter = new ExceptionReporter();
            reporter.ReadConfig();
            reporter.Config.TitleText = "Oberon Crash Report";
            reporter.Show(e.Exception);
            e.Handled = true; // handle the exception so we don't crash
        }
예제 #6
0
파일: Program.cs 프로젝트: gipasoft/Sfera
        static void currentDomainUnhandledException(object sender, UnhandledExceptionEventArgs e)
        {
            var exception = e.ExceptionObject as Exception;

            var log = LogManager.GetLogger("Sfera");
            log.ErrorFormat("Errore inaspettato - {0}", e.ExceptionObject as Exception, Utility.GetMethodDescription());

            if (exception != null)
            {
                var reporter = new ExceptionReporter();
                reporter.ReadConfig();  // optionally, read properties from the application's config file
                reporter.Config.ShowFlatButtons = true;   // this particular config is code-only
                reporter.Show(exception);
            }
        }
예제 #7
0
 public void ApplicationThreadException(object sender, ThreadExceptionEventArgs e)
 {
     ExceptionReporter reporter = new ExceptionReporter();
     reporter.Show(e.Exception);
 }
예제 #8
0
파일: Program.cs 프로젝트: gipasoft/Sfera
        static void applicationUnhandledException(object sender, ThreadExceptionEventArgs e)
        {
            var log = LogManager.GetLogger("Sfera");
            if (e.Exception != null)
            {
                log.ErrorFormat("Errore inaspettato - {0} - azienda:{1}", e.Exception, Utility.GetMethodDescription(), Login.Instance.CurrentLogin().Azienda);
                if (e.Exception.InnerException != null)
                    log.ErrorFormat("Errore inaspettato - INNER EXCEPTION - {0} - azienda:{1}", e.Exception.InnerException, Utility.GetMethodDescription(), Login.Instance.CurrentLogin().Azienda);
            }

            try
            {
                var reporter = new ExceptionReporter();
                reporter.ReadConfig();  // optionally, read properties from the application's config file
                reporter.Config.ShowFlatButtons = true;   // this particular config is code-only
                reporter.Show(e.Exception);
            }
            catch (Exception ex)
            {
                log.ErrorFormat("Errore inaspettato nella visualizzazione della maschera di errore gestito - {0} - azienda:{1}", ex, Utility.GetMethodDescription(), Login.Instance.CurrentLogin().Azienda);
            }
        }