예제 #1
0
 /// Code to execute on Unhandled Exceptions
 private static void UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
 {
     Log.Error("ScheduledAgent.UnhandledException() \n{0}", e.ToString());
     Log.Error("ScheduledAgent.UnhandledException() \n{0}", e.ToString());
     if (Debugger.IsAttached)
     {
         // An unhandled exception has occurred; break into the debugger
         //Debugger.Break();
     }
 }
예제 #2
0
파일: App.xaml.cs 프로젝트: v2nek/hydra
        // Code to execute on Unhandled Exceptions
        private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
        {
            if (System.Diagnostics.Debugger.IsAttached)
            {
                // An unhandled exception has occurred; break into the debugger
                System.Diagnostics.Debugger.Break();

                Deployment.Current.Dispatcher.BeginInvoke(() => MessageBox.Show(e.ToString()));
            }
            Deployment.Current.Dispatcher.BeginInvoke(() => MessageBox.Show(e.ToString()));
        }
 /// Code to execute on Unhandled Exceptions
 private static void UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
 {
     if (Debugger.IsAttached)
     {
         // An unhandled exception has occurred; break into the debugger
         Debugger.Break();
         Debugger.Log(1, "exception", "UnhandledException e=" + e.ToString());
     }
 }
예제 #4
0
파일: App.xaml.cs 프로젝트: pondyond/db4o
 private static void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
 {
     if (!Debugger.IsAttached)
     {
         MessageBox.Show(e.ToString());
         e.Handled = true;
         Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
     }
 }
예제 #5
0
 // Code to execute on Unhandled Exceptions
 private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
 {
     if (System.Diagnostics.Debugger.IsAttached)
     {
         // An unhandled exception has occurred; break into the debugger
         System.Diagnostics.Debug.WriteLine(e.ToString());
         System.Diagnostics.Debugger.Break();
     }
 }
예제 #6
0
 // Code to execute on Unhandled Exceptions
 private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
 {
     if (Debugger.IsAttached)
     {
         // An unhandled exception has occurred; break into the debugger
         Debugger.Break();
     }
     WriteDataToFileAsync("Log.txt", e.ToString()).RunSynchronously();
 }
예제 #7
0
        // Code to execute on Unhandled Exceptions
        private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
        {
            if (System.Diagnostics.Debugger.IsAttached)
            {
                // An unhandled exception has occurred; break into the debugger
                System.Diagnostics.Debugger.Break();
            }

            MessageBox.Show(e.ToString() + e.ExceptionObject.Message);
        }
예제 #8
0
 // Code to execute on Unhandled Exceptions
 private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
 {
     if (Debugger.IsAttached)
     {
         // An unhandled exception has occurred; break into the debugger
         Debugger.Break();
     }
     MessageBox.Show(e.ToString());
     e.Handled = true;
 }
예제 #9
0
        private void ReportErrorToDOM(ApplicationUnhandledExceptionEventArgs e)
        {
            try
            {
                var errorMsg = e.ToString();
                errorMsg = errorMsg.Replace('"', '\'').Replace("\r\n", @"\n");

                HtmlPage.Window.Eval("throw new Error(\"Unhandled Error in Silverlight Application " + errorMsg + "\");");
            }
            catch (Exception) {}
        }
예제 #10
0
 // Code to execute on Unhandled Exceptions
 private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
 {
     if (Debugger.IsAttached)
     {
         // An unhandled exception has occurred; break into the debugger
         Debugger.Break();
     }
     else
     {
         RootFrame.Dispatcher.BeginInvoke(() =>
         {
             MessageBox.Show(e.ToString());
         });
     }
 }
예제 #11
0
 private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
 {
     // 如果应用程序是在调试器外运行的,则使用浏览器的
     // 异常机制报告该异常。在 IE 上,将在状态栏中用一个
     // 黄色警报图标来显示该异常,而 Firefox 则会显示一个脚本错误。
     if (!System.Diagnostics.Debugger.IsAttached)
     {
         // 注意: 这使应用程序可以在已引发异常但尚未处理该异常的情况下
         // 继续运行。
         // 对于生产应用程序,此错误处理应替换为向网站报告错误
         // 并停止应用程序。
         e.Handled = true;
         Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); });
         if (Configer.Instance.Debug)
         {
             MessageBox.Show(e.ToString());
         }
     }
 }
예제 #12
0
        // Code to execute on Unhandled Exceptions
        private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
        {
            if (Debugger.IsAttached)
            {
                // An unhandled exception has occurred; break into the debugger
                Debugger.Break();
            }

            // TODO: log, mail and add our own exception reporter
            XLog.WriteDebug(e.ToString());
        }