From: Joohyun Kim Date: Mon, 1 Jul 2013 05:59:39 +0000 (+0900) Subject: Update invalid key on SystemInfo X-Git-Tag: accepted/tizen/20130912.081851^2~174 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=42e4234a78a8531503d0ed065e31f30d5a129682;p=platform%2Fframework%2Fnative%2Fappfw.git Update invalid key on SystemInfo Change-Id: Ia16c4879eade3c73eb4e2856410739954578b9d1 Signed-off-by: Joohyun Kim --- diff --git a/src/system/FSys_SystemInfoImpl.cpp b/src/system/FSys_SystemInfoImpl.cpp index dc94f8a..b7883c2 100644 --- a/src/system/FSys_SystemInfoImpl.cpp +++ b/src/system/FSys_SystemInfoImpl.cpp @@ -489,6 +489,7 @@ _SystemInfoImpl::GetSysInfo(const String& key, String& value) char* pStringValue = null; String tKey; tizenKey.SubString(7, tKey); + SysTryReturnResult(NID_SYS, tKey.GetLength() > 0, E_OBJ_NOT_FOUND, "Required key should be longer than 0."); ClearLastResult(); unique_ptr< char[] > systemKey(_StringConverter::CopyToCharArrayN(tKey)); @@ -555,6 +556,7 @@ _SystemInfoImpl::GetSysInfo(const String& key, int& value) String tKey; tizenKey.SubString(7, tKey); + SysTryReturnResult(NID_SYS, tKey.GetLength() > 0, E_OBJ_NOT_FOUND, "Required key should be longer than 0."); ClearLastResult(); unique_ptr< char[] > systemKey(_StringConverter::CopyToCharArrayN(tKey)); @@ -613,6 +615,7 @@ _SystemInfoImpl::GetSysInfo(const String& key, bool& value) { String tKey; tizenKey.SubString(7, tKey); + SysTryReturnResult(NID_SYS, tKey.GetLength() > 0, E_OBJ_NOT_FOUND, "Required key should be longer than 0."); ClearLastResult(); unique_ptr< char[] > systemKey(_StringConverter::CopyToCharArrayN(tKey)); @@ -660,6 +663,7 @@ _SystemInfoImpl::GetPlatformVersion(String& platformVersion) char* pStringValue = null; String tKey; tizenKey.SubString(7, tKey); + SysTryReturnResult(NID_SYS, tKey.GetLength() > 0, E_SYSTEM, "Required key should be longer than 0."); ClearLastResult(); unique_ptr< char[] > systemKey(_StringConverter::CopyToCharArrayN(tKey)); @@ -689,6 +693,7 @@ _SystemInfoImpl::GetBuildInfo(String& buildInfo) char* pStringValue = null; String tKey; tizenKey.SubString(7, tKey); + SysTryReturnResult(NID_SYS, tKey.GetLength() > 0, E_SYSTEM, "Required key should be longer than 0."); ClearLastResult(); unique_ptr< char[] > systemKey(_StringConverter::CopyToCharArrayN(tKey)); @@ -718,6 +723,7 @@ _SystemInfoImpl::GetNativeApiVersion(String& nativeApiVersion) char* pStringValue = null; String tKey; tizenKey.SubString(7, tKey); + SysTryReturnResult(NID_SYS, tKey.GetLength() > 0, E_SYSTEM, "Required key should be longer than 0."); ClearLastResult(); unique_ptr< char[] > systemKey(_StringConverter::CopyToCharArrayN(tKey)); @@ -747,6 +753,7 @@ _SystemInfoImpl::GetWebApiVersion(String& webApiVersion) char* pStringValue = null; String tKey; tizenKey.SubString(7, tKey); + SysTryReturnResult(NID_SYS, tKey.GetLength() > 0, E_SYSTEM, "Required key should be longer than 0."); ClearLastResult(); unique_ptr< char[] > systemKey(_StringConverter::CopyToCharArrayN(tKey));