Last active
June 22, 2017 20:35
-
-
Save dcomartin/5b51af8cdb22fc00b41a5e7b6064b964 to your computer and use it in GitHub Desktop.
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
// In MainActivity | |
protected override void OnCreate(Bundle bundle) | |
{ | |
base.OnCreate(bundle); | |
AppDomain.CurrentDomain.UnhandledException += CurrentDomainOnUnhandledException; | |
//TaskScheduler.UnobservedTaskException += TaskSchedulerOnUnobservedTaskException; ???? | |
Xamarin.Forms.Forms.Init(this, bundle); | |
var app = new App(); | |
LoadApplication(app); | |
} | |
private static void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs unhandledExceptionEventArgs) | |
{ | |
try | |
{ | |
// (unhandledExceptionEventArgs.ExceptionObject as Exception).ToExceptionless.Submit();// or whatever it is | |
} | |
catch | |
{ | |
// just suppress any error logging exceptions | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment