Refactoring

This commit is contained in:
M66B
2025-11-25 21:10:32 +01:00
parent cbac1a0f7a
commit 7850aecddc
2 changed files with 3 additions and 6 deletions

View File

@@ -589,10 +589,11 @@ class Core {
op.error = Log.formatThrowable(ex, !EntityOperation.BODY.equals(op.name));
db.operation().setOperationError(op.id, op.error);
if (message != null &&
if (message != null && op.error != null &&
!EntityOperation.FETCH.equals(op.name) &&
!EntityOperation.ATTACHMENT.equals(op.name) &&
!(ex instanceof IllegalArgumentException))
!(ex instanceof IllegalArgumentException) &&
!(account.isGmail() && op.error.toLowerCase(Locale.ROOT).contains("system error")))
db.message().setMessageError(message.id, op.error);
db.setTransactionSuccessful();

View File

@@ -1559,10 +1559,6 @@ public class Log {
ex.getCause().getMessage().contains("Socket is closed")))
return null;
if ((ex instanceof MessagingException || ex instanceof ProtocolException) &&
ex.getMessage() != null && ex.getMessage().contains("System Error (Failure)"))
return null; // Gmail
// javax.mail.MessagingException: AU3 BAD User is authenticated but not connected.;
// nested exception is:
// com.sun.mail.iap.BadCommandException: AU3 BAD User is authenticated but not connected.