From 42e4234a78a8531503d0ed065e31f30d5a129682 Mon Sep 17 00:00:00 2001 From: Joohyun Kim Date: Mon, 1 Jul 2013 14:59:39 +0900 Subject: [PATCH] Update invalid key on SystemInfo Change-Id: Ia16c4879eade3c73eb4e2856410739954578b9d1 Signed-off-by: Joohyun Kim --- src/system/FSys_SystemInfoImpl.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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)); -- 2.7.4