Fix prevent issue for package manager
[platform/framework/native/appfw.git] / src / app / package / FAppPkg_PackageAppInfoImpl.cpp
index c423671..ac447b9 100755 (executable)
@@ -466,7 +466,8 @@ _PackageAppInfoImpl::MetadataHandler(const char* pKey, const char* pValue, void*
        SysLog(NID_APP, "Key = [%s], Value = [%s]", pKey, pValue);
 
        MultiHashMap* pMultiMap = (MultiHashMap*) pUserData;
-       pMultiMap->Add(*(new (std::nothrow) String(pKey)), *(new (std::nothrow) String(pValue)));
+       result r = pMultiMap->Add(*(new (std::nothrow) String(pKey)), *(new (std::nothrow) String(pValue)));
+       SysTryReturn(NID_APP, r == E_SUCCESS, -1, E_SYSTEM, "pMultiMap->Add() failed. [%s]", GetErrorMessage(GetLastResult()));
 
        return 0;
 }