Prevent crash

This commit is contained in:
M66B 2019-03-03 17:07:23 +00:00
parent 8cff6353a6
commit 19c2da1773
2 changed files with 2 additions and 4 deletions

View File

@ -7,7 +7,6 @@ import android.preference.PreferenceManager;
import java.util.Date;
import java.util.Properties;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.Store;
@ -75,7 +74,7 @@ public class WorkerFolderSync extends Worker {
Log.i(account.name + " closing");
db.account().setAccountState(account.id, "closing");
istore.close();
} catch (MessagingException ex) {
} catch (Throwable ex) {
Log.e(ex);
} finally {
Log.i(account.name + " closed");

View File

@ -8,7 +8,6 @@ import java.util.Date;
import java.util.Properties;
import javax.mail.Folder;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.Store;
import javax.mail.event.StoreEvent;
@ -107,7 +106,7 @@ public class WorkerOperations extends Worker {
db.account().setAccountState(account.id, "closing");
db.folder().setFolderState(folder.id, "closing");
istore.close();
} catch (MessagingException ex) {
} catch (Throwable ex) {
Log.w(ex);
} finally {
Log.i(account.name + " closed");