summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarthik Subas Chandra Bose <karthik.scb@samsung.com>2013-09-11 11:20:12 +0900
committerKarthik Subas Chandra Bose <karthik.scb@samsung.com>2013-09-11 11:20:12 +0900
commit256010d993051d7944f91ddce0d8540bc24985fc (patch)
tree4da499be247929edf208d5dd59990abba42d35c0
parent294c19914e69697aabaa3dc0bec8eb0cd25e8475 (diff)
downloadapp-service-256010d993051d7944f91ddce0d8540bc24985fc.tar.gz
app-service-256010d993051d7944f91ddce0d8540bc24985fc.tar.bz2
app-service-256010d993051d7944f91ddce0d8540bc24985fc.zip
Possible failure case when no record exist on database
Change-Id: I0e29ffb7e47596de4aa2f92fb902848f280f1c6a Signed-off-by: Karthik Subas Chandra Bose <karthik.scb@samsung.com>
-rw-r--r--src/FApp_ConditionManagerService.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/FApp_ConditionManagerService.cpp b/src/FApp_ConditionManagerService.cpp
index a36f268..fd8f77b 100644
--- a/src/FApp_ConditionManagerService.cpp
+++ b/src/FApp_ConditionManagerService.cpp
@@ -120,6 +120,7 @@ _ConditionManagerService::InitializePluginData(void)
r = reg.GetSectionListN(&pSections);
SysTryReturnResult(NID_APP, !IsFailed(r), r, "failed to GetSectionListN.");
+ SysTryReturnResult(NID_APP, pSections != null, r, "Condition plugin info does not exist.");
std::unique_ptr<IEnumerator> pEnum(pSections->GetEnumeratorN());
SysTryCatch(NID_APP, pEnum != null, , E_FAILURE, "failed to GetEnumeratorN.");
@@ -250,6 +251,7 @@ _ConditionManagerService::InitializeConditionalOperations(void)
r = _ConditionDatabaseHelper::GetAllSectionsFromConditionDb(pSections.get());
SysTryReturnResult(NID_APP, !IsFailed(r), r, "failed to GetAllSectionsFromConditionDb.");
+ SysTryReturnResult(NID_APP, pSections != null, r, "App Launch conditions does not exist.");
std::unique_ptr< IEnumerator > pEnum(pSections->GetEnumeratorN());
SysTryReturnResult(NID_APP, pEnum != null, r, "failed to GetEnumeratorN.");
@@ -620,7 +622,7 @@ _ConditionDatabaseHelper::GetAllSectionsFromConditionDb(ArrayList* pSections)
sql.Append(L"SELECT SectionName FROM CondTbl");
std::unique_ptr<DbEnumerator> pEnum(condDb.QueryN(sql));
- SysTryReturnResult(NID_APP, pEnum != null, E_FAILURE, "failed to query sql statement.");
+ SysTryReturnResult(NID_APP, pEnum != null, E_SUCCESS, "No record exists in database.");
while (pEnum->MoveNext() == E_SUCCESS)
{