Browse Source

Handle message removed while getting attachments

main
M66B 5 years ago
parent
commit
e1447ad132
1 changed files with 16 additions and 0 deletions
  1. +16
    -0
      app/src/main/java/eu/faircode/email/ServiceSynchronize.java

+ 16
- 0
app/src/main/java/eu/faircode/email/ServiceSynchronize.java View File

@ -521,6 +521,11 @@ public class ServiceSynchronize extends LifecycleService {
synchronizeMessage(ServiceSynchronize.this, folder, ifolder, (IMAPMessage) imessage, false);
} catch (MessageRemovedException ex) {
Log.w(Helper.TAG, folder.name + " " + ex + "\n" + Log.getStackTraceString(ex));
} catch (IOException ex) {
if (ex.getCause() instanceof MessageRemovedException)
Log.w(Helper.TAG, folder.name + " " + ex + "\n" + Log.getStackTraceString(ex));
else
throw ex;
}
EntityOperation.process(ServiceSynchronize.this); // download small attachments
} catch (Throwable ex) {
@ -583,6 +588,11 @@ public class ServiceSynchronize extends LifecycleService {
EntityOperation.process(ServiceSynchronize.this); // download small attachments
} catch (MessageRemovedException ex) {
Log.w(Helper.TAG, folder.name + " " + ex + "\n" + Log.getStackTraceString(ex));
} catch (IOException ex) {
if (ex.getCause() instanceof MessageRemovedException)
Log.w(Helper.TAG, folder.name + " " + ex + "\n" + Log.getStackTraceString(ex));
else
throw ex;
}
} catch (Throwable ex) {
Log.e(Helper.TAG, folder.name + " " + ex + "\n" + Log.getStackTraceString(ex));
@ -1282,6 +1292,12 @@ public class ServiceSynchronize extends LifecycleService {
unchanged++;
} catch (MessageRemovedException ex) {
Log.w(Helper.TAG, folder.name + " " + ex + "\n" + Log.getStackTraceString(ex));
} catch (IOException ex) {
// Getting attachments
if (ex.getCause() instanceof MessageRemovedException)
Log.w(Helper.TAG, folder.name + " " + ex + "\n" + Log.getStackTraceString(ex));
else
throw ex;
}
EntityOperation.process(this); // download small attachments


Loading…
Cancel
Save