private void OnAndroidAppUnhandledException(object sender, Android.Runtime.RaiseThrowableEventArgs args) { args.Handled = true; var correlationId = Guid.NewGuid(); this.EventLogger.WriteCritical($"An unhandled exception was thrown. Correlation ID: {correlationId}. Error: {args.Exception}."); this.ExceptionObserved?.Invoke(this, new ExceptionObservedEventArgs(correlationId, args.Exception)); }
private void OnUnhandledManagedException(object sender, Android.Runtime.RaiseThrowableEventArgs e) { if (!AutoNotify) { return; } // Cache the app and system states, since filling them when the exception bubles to the global // app domain unhandled exception is impossible. CacheStates(); }
static void OnAndroidUnhandledException(object sender, Android.Runtime.RaiseThrowableEventArgs e) { e.Handled = true; OnUnhandledException(e.Exception); }