mirror of https://github.com/M66B/FairEmail.git
Prevent crash
This commit is contained in:
parent
8cff6353a6
commit
19c2da1773
|
@ -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");
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue