private Exception LogAndConvertJavaException(Exception e) { Kp2aLog.Log(e.Message); if (e is UserInteractionRequiredException) { return(e); } //seems like UserInteractionRequiredException is not propagated correctly into the C# world, we can't catch it // -> rethrow correctly here // Note: the Contains-check looks a bit broad, but it should be safe if (e.ToString().Contains("keepass2android.javafilestorage.UserInteractionRequiredException")) { throw new UserInteractionRequiredException(); } Java.Lang.Exception exception = e as Java.Lang.Exception; if (exception != null) { var ex = new Exception(exception.LocalizedMessage ?? e.Message ?? _app.GetResourceString(UiStringKey.ErrorOcurred) + exception.GetType().Name, e); return(ex); } return(e); }
public void OnFailure(Java.Lang.Exception p0) { try { Methods.DisplayReportResultTrack(p0); } catch { // ignored } }
public void OnError(Java.Lang.Exception error) { try { Toast.MakeText(this, error.Message, ToastLength.Long).Show(); } catch (Exception e) { Console.WriteLine(e); } }
public void OnError(Java.Lang.Exception error) { try { AndHUD.Shared.Dismiss(this); Toast.MakeText(this, error.Message, ToastLength.Long)?.Show(); } catch (Exception e) { Methods.DisplayReportResultTrack(e); } }