1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-19 13:48:58 +00:00

Improved error handling

This commit is contained in:
M66B 2020-06-21 17:21:42 +02:00
parent ae41f7e830
commit ca687ed523

View file

@ -5243,7 +5243,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
DB db = DB.getInstance(context);
EntityMessage message = db.message().getMessage(id);
if (message == null)
throw new FileNotFoundException();
throw new FileNotFoundException("message gone");
File file = message.getRawFile(context);
Log.i("Raw file=" + file);
@ -5292,7 +5292,7 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
@Override
protected void onException(Bundle args, Throwable ex) {
if (ex instanceof IllegalArgumentException)
if (ex instanceof IllegalArgumentException || ex instanceof FileNotFoundException)
Snackbar.make(view, ex.getMessage(), Snackbar.LENGTH_LONG).show();
else
Log.unexpectedError(getParentFragmentManager(), ex);