-
-
Notifications
You must be signed in to change notification settings - Fork 6
W8 WP8 UAP UWP
Davide Benvegnù edited this page Nov 14, 2019
·
5 revisions
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).