Wrap throwables

This commit is contained in:
M66B
2023-12-11 22:04:19 +01:00
parent 37e145a9d6
commit c4a1384232
13 changed files with 87 additions and 26 deletions

View File

@@ -205,7 +205,7 @@ public class FragmentGmail extends FragmentBase {
startActivityForResult(intent, ActivitySetup.REQUEST_CHOOSE_ACCOUNT);
} catch (Throwable ex) {
if (ex instanceof IllegalArgumentException)
tvError.setText(ex.getMessage());
tvError.setText(new ThrowableWrapper(ex).getSafeMessage());
else
tvError.setText(Log.formatThrowable(ex, false));
grpError.setVisibility(View.VISIBLE);
@@ -631,7 +631,7 @@ public class FragmentGmail extends FragmentBase {
Log.e(ex);
if (ex instanceof IllegalArgumentException)
tvError.setText(ex.getMessage());
tvError.setText(new ThrowableWrapper(ex).getSafeMessage());
else
tvError.setText(Log.formatThrowable(ex, false));
grpError.setVisibility(View.VISIBLE);