Skip to content

Instantly share code, notes, and snippets.

@Aaronontheweb
Created October 17, 2012 19:33
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/3907612 to your computer and use it in GitHub Desktop.
Save Aaronontheweb/3907612 to your computer and use it in GitHub Desktop.
Last-chance exception handling code in WinRT [C#/XAML] using MarkedUp
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
sealed partial class App : Application
{
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
this.InitializeComponent();
this.Suspending += OnSuspending;
this.UnhandledException += (s, e) => MarkedUp.AnalyticClient.LogLastChanceException(e);
}
/* Rest of the app methods and events... */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment