From 05ce6654094ce54b498d79b6da3440b7c65ff1cf Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 23 Dec 2018 08:06:22 +0000 Subject: [PATCH] Suppress file not found error on loading draft texts --- app/src/main/java/eu/faircode/email/FragmentCompose.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index 2b31137151..4a3ad54403 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -79,6 +79,7 @@ import java.io.BufferedOutputStream; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; +import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; @@ -1372,7 +1373,8 @@ public class FragmentCompose extends FragmentEx { @Override protected void onException(Bundle args, Throwable ex) { - Helper.unexpectedError(getContext(), getViewLifecycleOwner(), ex); + if (!(ex instanceof FileNotFoundException)) + Helper.unexpectedError(getContext(), getViewLifecycleOwner(), ex); } }.load(FragmentCompose.this, a);