コード例 #1
0
ファイル: ViewModelBase.cs プロジェクト: JonHaywood/Oberon
 /// <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
ファイル: Program.cs プロジェクト: shruggles/dynamicskypebot
        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
ファイル: Program.cs プロジェクト: shruggles/dynamicskypebot
        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
ファイル: App.xaml.cs プロジェクト: JonHaywood/Oberon
        /// <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
ファイル: TabsConsole.cs プロジェクト: NullProjects/METAbolt
 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);
            }
        }