Added error messages

pull/194/head
M66B 4 years ago
parent f5ef1ee261
commit d8f95f46bb

@ -950,8 +950,11 @@ class Core {
// Check message ID to check raw message file content // Check message ID to check raw message file content
MessageHelper helper = new MessageHelper(imessage, context); MessageHelper helper = new MessageHelper(imessage, context);
String msgid = helper.getMessageID(); String msgid = helper.getMessageID();
if (TextUtils.isEmpty(message.msgid) || !Objects.equals(message.msgid, msgid)) if (TextUtils.isEmpty(message.msgid) || !Objects.equals(message.msgid, msgid)) {
throw new IllegalArgumentException("Inconsistent msgid=" + message.msgid + "/" + msgid); String msg = "Inconsistent msgid=" + message.msgid + "/" + msgid;
Log.e(msg);
throw new IllegalArgumentException(msg);
}
} }
db.message().setMessageRaw(message.id, true); db.message().setMessageRaw(message.id, true);
@ -1022,8 +1025,11 @@ class Core {
} }
} else { } else {
Long found = findUid(context, ifolder, message.msgid, false); Long found = findUid(context, ifolder, message.msgid, false);
if (found == null) if (found == null) {
throw new IllegalArgumentException("Added message not found"); String msg = "Added message not found msgid" + message.msgid;
Log.e(msg);
throw new IllegalArgumentException(msg);
}
// Mark source read // Mark source read
if (autoread) if (autoread)

Loading…
Cancel
Save