Skip to content

Instantly share code, notes, and snippets.

@Aaronontheweb
Created August 21, 2012 07:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Aaronontheweb/3413315 to your computer and use it in GitHub Desktop.
Save Aaronontheweb/3413315 to your computer and use it in GitHub Desktop.
Windows Phone 7 Last-Chance Exception Handling with LittleWatson
// 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