mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-22 22:21:18 +00:00
Improved error handling
This commit is contained in:
parent
f96860ead5
commit
da8c490640
1 changed files with 4 additions and 2 deletions
|
@ -409,6 +409,7 @@ class Core {
|
||||||
ex instanceof FileNotFoundException ||
|
ex instanceof FileNotFoundException ||
|
||||||
ex instanceof FolderNotFoundException ||
|
ex instanceof FolderNotFoundException ||
|
||||||
ex instanceof IllegalArgumentException ||
|
ex instanceof IllegalArgumentException ||
|
||||||
|
ex instanceof SQLiteConstraintException ||
|
||||||
ex.getCause() instanceof BadCommandException ||
|
ex.getCause() instanceof BadCommandException ||
|
||||||
ex.getCause() instanceof CommandFailedException) {
|
ex.getCause() instanceof CommandFailedException) {
|
||||||
// com.sun.mail.iap.BadCommandException: B13 BAD [TOOBIG] Message too large
|
// com.sun.mail.iap.BadCommandException: B13 BAD [TOOBIG] Message too large
|
||||||
|
@ -489,12 +490,13 @@ class Core {
|
||||||
if (TextUtils.isEmpty(message.msgid))
|
if (TextUtils.isEmpty(message.msgid))
|
||||||
throw new IllegalArgumentException("Message without msgid for " + op.name);
|
throw new IllegalArgumentException("Message without msgid for " + op.name);
|
||||||
|
|
||||||
message.uid = findUid(ifolder, message.msgid, false);
|
Long uid = findUid(ifolder, message.msgid, false);
|
||||||
if (message.uid == null)
|
if (uid == null)
|
||||||
throw new IllegalArgumentException("Message not found for " + op.name);
|
throw new IllegalArgumentException("Message not found for " + op.name);
|
||||||
|
|
||||||
DB db = DB.getInstance(context);
|
DB db = DB.getInstance(context);
|
||||||
db.message().setMessageUid(message.id, message.uid);
|
db.message().setMessageUid(message.id, message.uid);
|
||||||
|
message.uid = uid;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Long findUid(IMAPFolder ifolder, String msgid, boolean purge) throws MessagingException {
|
private static Long findUid(IMAPFolder ifolder, String msgid, boolean purge) throws MessagingException {
|
||||||
|
|
Loading…
Reference in a new issue