From 45937ae10bd1dc046f49c8f1e6b47f10257f9eec Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 11 May 2022 14:43:55 +0200 Subject: [PATCH] Reduced logging --- app/src/main/java/eu/faircode/email/Core.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/Core.java b/app/src/main/java/eu/faircode/email/Core.java index c8d5bf5cd9..dd9dca2b5d 100644 --- a/app/src/main/java/eu/faircode/email/Core.java +++ b/app/src/main/java/eu/faircode/email/Core.java @@ -533,7 +533,10 @@ class Core { ops.remove(s); } catch (Throwable ex) { iservice.dump(account.name + "/" + folder.name); - if (ex instanceof OperationCanceledException) + if (ex instanceof OperationCanceledException || + (ex instanceof IllegalArgumentException && + ex.getMessage() != null && + ex.getMessage().startsWith("Message not found for"))) Log.i(folder.name, ex); else Log.e(folder.name, ex); @@ -801,7 +804,7 @@ class Core { Log.e(ex); } - throw new OperationCanceledException("Message not found for " + op.name + " folder=" + folder.name); + throw new IllegalArgumentException("Message not found for " + op.name + " folder=" + folder.name); } db.message().setMessageUid(message.id, message.uid);