Created
August 21, 2012 07:59
-
-
Save Aaronontheweb/3413315 to your computer and use it in GitHub Desktop.
Windows Phone 7 Last-Chance Exception Handling with LittleWatson
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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(); | |
} | |
else | |
{ | |
LittleWatson.ReportException(e.ExceptionObject, | |
GetType().Assembly.FullName); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment