From: Pawel Andruszkiewicz
Date: Fri, 30 Jan 2015 08:46:07 +0000 (+0100)
Subject: [Messaging] Throw when email message is not found.
X-Git-Tag: submit/tizen_tv/20150603.064601~1^2~528
X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=11bdc9a3e629526cf8ae32d349a20fc84af64326;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git
[Messaging] Throw when email message is not found.
Change-Id: I8ed00c756bb0bcf1216b4bce66712b8b2d19885f
Signed-off-by: Pawel Andruszkiewicz
---
diff --git a/src/messaging/messaging_util.cc b/src/messaging/messaging_util.cc
index 00bb3f9e..90dd036e 100644
--- a/src/messaging/messaging_util.cc
+++ b/src/messaging/messaging_util.cc
@@ -512,6 +512,8 @@ std::shared_ptr MessagingUtil::jsonToMessage(const picojson::value& jso
email_mail_data_t* mail = NULL;
if (EMAIL_ERROR_NONE != email_get_mail_data(mail_id, &mail)) {
// TODO what should happen?
+ LoggerE("Fatal error: message not found: %d!", mail_id);
+ throw common::TypeMismatchException("Failed to find specified email.");
} else {
message = Message::convertPlatformEmailToObject(*mail);
email_free_mail_data(&mail,1);