Sanitize operation exceptions

pull/156/head
M66B 6 years ago
parent 9bdebbc082
commit 50690a8544

@ -264,7 +264,7 @@ class Core {
Log.e(folder.name, ex);
reportError(context, account, folder, ex);
db.operation().setOperationError(op.id, Helper.formatThrowable(ex));
db.operation().setOperationError(op.id, Helper.formatThrowable(ex, true));
if (message != null && !(ex instanceof IllegalArgumentException))
db.message().setMessageError(message.id, Helper.formatThrowable(ex, true));

@ -376,11 +376,10 @@ public class Helper {
return null;
if (ex instanceof FolderClosedException)
return null;
if (ex instanceof IllegalStateException)
// sync when store disconnected
if (ex instanceof IllegalStateException &&
("Not connected".equals(ex.getMessage()) ||
"This operation is not allowed on a closed folder".equals(ex.getMessage())))
return null;
//if (ex instanceof SSLException || ex.getCause() instanceof SSLException)
// return null;
if (ex instanceof MailConnectException && ex.getCause() instanceof UnknownHostException)
return null;
}

Loading…
Cancel
Save