From 06526b9ae7f8e573792577bea6caf5a81c44f759 Mon Sep 17 00:00:00 2001 From: Byounghui Date: Fri, 6 Sep 2013 16:39:51 +0900 Subject: [PATCH] error log added. Change-Id: Ibb7f7a5fb40e3984d552459bdc02427a22c242bc Signed-off-by: Byounghui --- src/FMsg_WapPushManagerImpl.cpp | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/FMsg_WapPushManagerImpl.cpp b/src/FMsg_WapPushManagerImpl.cpp index eed31db..a739e02 100644 --- a/src/FMsg_WapPushManagerImpl.cpp +++ b/src/FMsg_WapPushManagerImpl.cpp @@ -85,19 +85,20 @@ _WapPushManagerImpl::AddWapPushEventListener(const Tizen::Base::String& wapAppli if (!__pWapPushReceiveEvent) { __pWapPushReceiveEvent = new (std::nothrow) _SmsEvent(); - SysTryCatch(NID_MSG, __pWapPushReceiveEvent != null, r = E_OUT_OF_MEMORY, r, "memory allocation failed."); + SysTryCatch(NID_MSG, __pWapPushReceiveEvent != null, r = E_OUT_OF_MEMORY, r, "[E_OUT_OF_MEMORY] memory allocation failed."); // event construction r = __pWapPushReceiveEvent->Construct(_SMS_EVENT_TYPE_WAP_PUSH_RECEIVE_RESULT); - SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "failed to construct push event"); + SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[%s] failed to construct push event", GetErrorMessage(r)); } // add listener r = __pWapPushReceiveEvent->AddListener(listener, true); - SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "failed to add push listner."); + SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[%s] failed to add push listner.", GetErrorMessage(r)); SysTryReturnResult(NID_MSG, _MessagingProxy::GetInstance()!= null, E_OUT_OF_MEMORY, "Failed to get msg proxy instance"); r = _MessagingProxy::GetInstance()->AddWapPushEventListener(wapApplicationId, __pWapPushReceiveEvent); + SysTryCatch(NID_CNT, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); return r; @@ -119,10 +120,10 @@ _WapPushManagerImpl::RemoveWapPushEventListener(const Tizen::Base::String& wapAp result r = E_SUCCESS; ClearLastResult(); - SysTryCatch(NID_MSG, __pWapPushReceiveEvent != null, r = E_OBJ_NOT_FOUND, r, "listner not found"); + SysTryCatch(NID_MSG, __pWapPushReceiveEvent != null, r = E_OBJ_NOT_FOUND, r, "[E_OBJ_NOT_FOUND] listner not found"); r = __pWapPushReceiveEvent->RemoveListener(listener); - SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "listner remove failed"); + SysTryCatch(NID_MSG, r == E_SUCCESS, , r, "[%s] listner remove failed", GetErrorMessage(r)); delete __pWapPushReceiveEvent; __pWapPushReceiveEvent = null; @@ -139,8 +140,12 @@ _WapPushManagerImpl::RegisterCondition(const Tizen::Base::String& wapApplication result r = E_SUCCESS; SysTryReturnResult(NID_MSG, _MessagingProxy::GetInstance()!= null, E_OUT_OF_MEMORY, "Failed to get msg proxy instance"); r = _MessagingProxy::GetInstance()->RegisterCondition(wapApplicationId,contentType); + SysTryCatch(NID_CNT, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); return r; + +CATCH: + return r; } @@ -150,8 +155,12 @@ _WapPushManagerImpl::UnregisterCondition(const Tizen::Base::String& wapApplicati result r = E_SUCCESS; SysTryReturnResult(NID_MSG, _MessagingProxy::GetInstance()!= null, E_OUT_OF_MEMORY, "Failed to get msg proxy instance"); r = _MessagingProxy::GetInstance()->UnregisterCondition(wapApplicationId,contentType); + SysTryCatch(NID_CNT, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r)); return r; + +CATCH: + return r; } -- 2.7.4