Improved operation error handling

This commit is contained in:
M66B 2018-12-28 16:20:45 +00:00
parent b6a9c6a972
commit b0be5058f5
1 changed files with 5 additions and 3 deletions

View File

@ -1501,14 +1501,16 @@ public class ServiceSynchronize extends LifecycleService {
if (ex instanceof MessageRemovedException ||
ex instanceof FolderNotFoundException ||
ex instanceof SendFailedException) {
ex instanceof SendFailedException ||
ex instanceof IllegalArgumentException) {
Log.w("Unrecoverable", ex);
// There is no use in repeating
db.operation().deleteOperation(op.id);
if (ex instanceof MessageRemovedException)
db.message().deleteMessage(op.message);
if (message != null &&
ex instanceof MessageRemovedException)
db.message().deleteMessage(message.id);
continue;
} else if (ex instanceof MessagingException) {