w8 wp8 uap uwp - n3wt0n/BugGuardian GitHub Wiki
To add automatic bugs interception on any Unhandled Exception on W8, WP8, UAP and UWP you need to register a new UnhandledExceptionEventHandler.
You can do it in the very beginning of the App class ctor.
public App()
{
this.InitializeComponent();
this.UnhandledException += BugGuardianExceptionTrapper;
this.Suspending += this.OnSuspending;
[...]
//Your code here
[....]
}
private void BugGuardianExceptionTrapper(object sender, UnhandledExceptionEventArgs e)
{
using (var manager = new DBTek.BugGuardian.BugGuardianManager())
{
manager.AddBug(e.Exception);
}
}
Remember to check the configuration page to have info on how to set the BugGuardian setting parameters via Code (required for this kind of app).