mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-23 22:51:02 +00:00
Improved error reporting
This commit is contained in:
parent
d8d56919c6
commit
2e3ce7b708
1 changed files with 12 additions and 2 deletions
|
@ -46,6 +46,7 @@ import com.sun.mail.imap.IMAPFolder;
|
|||
import com.sun.mail.imap.IMAPMessage;
|
||||
import com.sun.mail.imap.IMAPStore;
|
||||
import com.sun.mail.imap.protocol.IMAPProtocol;
|
||||
import com.sun.mail.util.MailConnectException;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
|
@ -328,9 +329,18 @@ public class ServiceSynchronize extends LifecycleService {
|
|||
// - can happen when syncing message
|
||||
|
||||
// MailConnectException
|
||||
// - on connectity problems when connecting to stoe
|
||||
|
||||
if (!(ex instanceof FolderClosedException) && !(ex instanceof IllegalStateException)) {
|
||||
String action = account + "/" + folder;
|
||||
if (!(ex instanceof MailConnectException) &&
|
||||
!(ex instanceof FolderClosedException) &&
|
||||
!(ex instanceof IllegalStateException)) {
|
||||
String action;
|
||||
if (TextUtils.isEmpty(account))
|
||||
action = folder;
|
||||
else if (TextUtils.isEmpty(folder))
|
||||
action = account;
|
||||
else
|
||||
action = account + "/" + folder;
|
||||
NotificationManager nm = getSystemService(NotificationManager.class);
|
||||
nm.notify(action, 1, getNotificationError(action, ex).build());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue