Fixed the code about GetPersonsByCategory does not return E_OBJ_NOT_FOUND when the... 78/13578/1
authorGwangbok Kim <gwangbok.kim@samsung.com>
Mon, 28 Oct 2013 04:11:09 +0000 (13:11 +0900)
committerhs321.lee <hs321.lee@samsung.com>
Tue, 10 Dec 2013 04:39:50 +0000 (13:39 +0900)
Change-Id: If0e946a5233d3551c6144aa356d6509e1e602518
Signed-off-by: Gwangbok Kim <gwangbok.kim@samsung.com>
Signed-off-by: hs321.lee <hs321.lee@samsung.com>
src/FScl_AddressbookManagerImpl.cpp

index f968808..314b125 100644 (file)
@@ -1450,6 +1450,10 @@ _AddressbookManagerImpl::GetPersonsByCategoryN(RecordId categoryId) const
 
        ClearLastResult();
 
+       unique_ptr<ContactRecord, ContactRecordDeleter> pCategoryRecord(_AddressbookUtil::GetContactRecordN(_contacts_group._uri, categoryId));
+       SysTryReturn(NID_SCL, GetLastResult() != E_OBJ_NOT_FOUND, null, GetLastResult(), "[%s] Propagating.", GetErrorMessage(GetLastResult()));
+       SysTryReturn(NID_SCL, GetLastResult() == E_SUCCESS, null, E_SYSTEM, "[%s] An system error has been occurred.", GetErrorMessage(E_SYSTEM));
+
        IList* pPersons = null;
 
        unique_ptr< __Filter<__ContactsPersonGroupRel> > pRwAbFilter(_AddressbookUtil::GetRwAbFilterN<__ContactsPersonGroupRel>());