Small improvements

pull/157/head
M66B 6 years ago
parent 9f5a829206
commit 22cedd0a84

@ -378,6 +378,7 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
try { try {
askPassword(true); askPassword(true);
} catch (Throwable ex) { } catch (Throwable ex) {
Log.e(ex);
Helper.unexpectedError(getSupportFragmentManager(), ex); Helper.unexpectedError(getSupportFragmentManager(), ex);
} }
} }
@ -386,6 +387,7 @@ public class ActivitySetup extends ActivityBilling implements FragmentManager.On
try { try {
askPassword(false); askPassword(false);
} catch (Throwable ex) { } catch (Throwable ex) {
Log.e(ex);
Helper.unexpectedError(getSupportFragmentManager(), ex); Helper.unexpectedError(getSupportFragmentManager(), ex);
} }
} }

@ -604,7 +604,8 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
@Override @Override
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
Toast.makeText(ActivityView.this, Helper.formatThrowable(ex, false), Toast.LENGTH_LONG).show(); Toast.makeText(ActivityView.this,
Helper.formatThrowable(ex, false), Toast.LENGTH_LONG).show();
} }
}.execute(this, new Bundle(), "crash:log"); }.execute(this, new Bundle(), "crash:log");
} }

@ -1078,8 +1078,10 @@ public class FragmentCompose extends FragmentBase {
} catch (Throwable ex) { } catch (Throwable ex) {
if (ex instanceof IllegalArgumentException) if (ex instanceof IllegalArgumentException)
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show(); Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
else else {
Log.e(ex);
Helper.unexpectedError(getFragmentManager(), ex); Helper.unexpectedError(getFragmentManager(), ex);
}
} }
else { else {
Snackbar snackbar = Snackbar.make(view, R.string.title_no_openpgp, Snackbar.LENGTH_LONG); Snackbar snackbar = Snackbar.make(view, R.string.title_no_openpgp, Snackbar.LENGTH_LONG);

@ -478,7 +478,6 @@ public class Helper {
@Override @Override
protected void onException(Bundle args, Throwable ex) { protected void onException(Bundle args, Throwable ex) {
Log.e(ex);
if (ex instanceof IllegalArgumentException) if (ex instanceof IllegalArgumentException)
Toast.makeText(context, ex.getMessage(), Toast.LENGTH_LONG).show(); Toast.makeText(context, ex.getMessage(), Toast.LENGTH_LONG).show();
else else

Loading…
Cancel
Save