Improved error handling

pull/190/head
M66B 4 years ago
parent bce0386fa4
commit 3ebb5c9fac

@ -947,10 +947,11 @@ class Core {
newuid = findUid(ifolder, message.msgid, true); newuid = findUid(ifolder, message.msgid, true);
if (newuid != null && (message.uid == null || newuid > message.uid)) if (newuid != null && (message.uid == null || newuid > message.uid))
try { try {
Log.i(folder.name + " Fetching uid=" + newuid);
JSONArray fargs = new JSONArray(); JSONArray fargs = new JSONArray();
fargs.put(newuid); fargs.put(newuid);
onFetch(context, fargs, folder, istore, ifolder, state); onFetch(context, fargs, folder, istore, ifolder, state);
} catch (JSONException ex) { } catch (Throwable ex) {
Log.e(ex); Log.e(ex);
} }
} else { } else {
@ -1098,12 +1099,15 @@ class Core {
icopy.setFlag(Flags.Flag.DRAFT, EntityFolder.DRAFTS.equals(target.type)); icopy.setFlag(Flags.Flag.DRAFT, EntityFolder.DRAFTS.equals(target.type));
} }
if (fetch) { if (fetch)
Log.w(target.name + " Fetching uid=" + uid); try {
JSONArray fargs = new JSONArray(); Log.i(target.name + " Fetching uid=" + uid);
fargs.put(uid); JSONArray fargs = new JSONArray();
onFetch(context, fargs, target, istore, itarget, state); fargs.put(uid);
} onFetch(context, fargs, target, istore, itarget, state);
} catch (Throwable ex) {
Log.e(ex);
}
} }
} catch (Throwable ex) { } catch (Throwable ex) {
Log.w(ex); Log.w(ex);

Loading…
Cancel
Save