Browse Source

More friendly boundary error messages

Fixes #138
main
M66B 6 years ago
parent
commit
74a7cd741e
1 changed files with 10 additions and 2 deletions
  1. +10
    -2
      app/src/main/java/eu/faircode/email/FragmentMessages.java

+ 10
- 2
app/src/main/java/eu/faircode/email/FragmentMessages.java View File

@ -683,7 +683,11 @@ public class FragmentMessages extends FragmentEx {
@Override @Override
public void onError(Context context, Throwable ex) { public void onError(Context context, Throwable ex) {
pbWait.setVisibility(View.GONE); pbWait.setVisibility(View.GONE);
Helper.unexpectedError(context, ex);
new DialogBuilderLifecycle(getContext(), getViewLifecycleOwner())
.setMessage(Helper.formatThrowable(ex))
.setPositiveButton(android.R.string.cancel, null)
.create()
.show();
} }
}); });
@ -725,7 +729,11 @@ public class FragmentMessages extends FragmentEx {
@Override @Override
public void onError(Context context, Throwable ex) { public void onError(Context context, Throwable ex) {
pbWait.setVisibility(View.GONE); pbWait.setVisibility(View.GONE);
Helper.unexpectedError(context, ex);
new DialogBuilderLifecycle(getContext(), getViewLifecycleOwner())
.setMessage(Helper.formatThrowable(ex))
.setPositiveButton(android.R.string.cancel, null)
.create()
.show();
} }
}); });


Loading…
Cancel
Save