From 2491108ff9607515af2fe77530cff908791108b6 Mon Sep 17 00:00:00 2001 From: M66B Date: Thu, 26 Dec 2024 22:22:02 +0100 Subject: [PATCH] Improved exception handling --- app/src/main/java/eu/faircode/email/IMAPFolderEx.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/IMAPFolderEx.java b/app/src/main/java/eu/faircode/email/IMAPFolderEx.java index cbe7bc7877..143d5a3b7e 100644 --- a/app/src/main/java/eu/faircode/email/IMAPFolderEx.java +++ b/app/src/main/java/eu/faircode/email/IMAPFolderEx.java @@ -141,9 +141,11 @@ public class IMAPFolderEx extends IMAPFolder { p.copy(ms, folder.getFullName()); } catch (CommandFailedException cfx) { if (cfx.getMessage() != null && - cfx.getMessage().contains("TRYCREATE")) + cfx.getMessage().contains("TRYCREATE")) { + Log.w(cfx); throw new FolderNotFoundException(folder, folder.getFullName() + " does not exist"); + } else throw new MessagingException(cfx.getMessage(), cfx); } catch (ConnectionException cex) {