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); }); } }
/// 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()); } }
private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e) { MessageBox.Show(e.ToString()); // If the app is running outside of the debugger then report the exception using // the browser's exception mechanism. On IE this will display it a yellow alert // icon in the status bar and Firefox will display a script error. if (!System.Diagnostics.Debugger.IsAttached) { // NOTE: This will allow the application to continue running after an exception has been thrown // but not handled. // For production applications this error handling should be replaced with something that will // report the error to the website and stop the application. e.Handled = true; Deployment.Current.Dispatcher.BeginInvoke(delegate { ReportErrorToDOM(e); }); } }
// 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 Debug.WriteLine(e.ToString()); Debugger.Break(); } }
// 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); }
private static void UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e) { Debug.WriteLine(e.ToString()); }
// 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())); }
// Código que se ejecuta ante excepciones no controladas private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e) { if (System.Diagnostics.Debugger.IsAttached) { // Se ha producido una excepción no controlada; interrumpir depurador Console.WriteLine(e.ToString()); System.Diagnostics.Debugger.Break(); } }
// Code, der bei nicht behandelten Ausnahmen ausgeführt wird private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e) { if (Debugger.IsAttached) { // Eine nicht behandelte Ausnahme ist aufgetreten. Unterbrechen und Debugger öffnen MessageBox.Show(e.ToString()); Debugger.Break(); } }