From e27c7b0c2bf81a07a9f4535dbaa640430e4a2e73 Mon Sep 17 00:00:00 2001 From: M66B Date: Fri, 14 Jun 2019 14:43:00 +0200 Subject: [PATCH] Handle removed exception when getting message body --- app/src/main/java/eu/faircode/email/MessageHelper.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/MessageHelper.java b/app/src/main/java/eu/faircode/email/MessageHelper.java index 389a98fe05..23ffa15026 100644 --- a/app/src/main/java/eu/faircode/email/MessageHelper.java +++ b/app/src/main/java/eu/faircode/email/MessageHelper.java @@ -58,6 +58,7 @@ import javax.mail.Flags; import javax.mail.FolderClosedException; import javax.mail.Header; import javax.mail.Message; +import javax.mail.MessageRemovedException; import javax.mail.MessagingException; import javax.mail.Multipart; import javax.mail.Part; @@ -847,7 +848,7 @@ public class MessageHelper { result = readStream((InputStream) content, "UTF-8"); else result = content.toString(); - } catch (IOException | FolderClosedException ex) { + } catch (IOException | FolderClosedException | MessageRemovedException ex) { throw ex; } catch (Throwable ex) { Log.w(ex);