本文整理汇总了C#中System.Windows.ApplicationUnhandledExceptionEventArgs.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# ApplicationUnhandledExceptionEventArgs.ToString方法的具体用法?C# ApplicationUnhandledExceptionEventArgs.ToString怎么用?C# ApplicationUnhandledExceptionEventArgs.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.ApplicationUnhandledExceptionEventArgs
的用法示例。
在下文中一共展示了ApplicationUnhandledExceptionEventArgs.ToString方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Application_UnhandledException
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); });
}
}
示例2: UnhandledException
/// 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());
}
}
示例3: Application_UnhandledException
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); });
}
}
示例4: Application_UnhandledException
// 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();
}
}
示例5: Application_UnhandledException
// 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);
}
示例6: UnhandledException
private static void UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
{
Debug.WriteLine(e.ToString());
}
示例7: Application_UnhandledException
// 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()));
}
示例8: Application_UnhandledException
// 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();
}
}
示例9: Application_UnhandledException
// 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();
}
}