Update Exception on SystemInfo
authorJoohyun Kim <joohyune.kim@samsung.com>
Thu, 4 Apr 2013 06:27:07 +0000 (15:27 +0900)
committerJoohyun Kim <joohyune.kim@samsung.com>
Thu, 4 Apr 2013 06:27:07 +0000 (15:27 +0900)
Change-Id: I69a0fd7f01d767bb72ea69f91668e5457acd716d
Signed-off-by: Joohyun Kim <joohyune.kim@samsung.com>
src/system/FSys_SystemClient.cpp
src/system/FSys_SystemInfoImpl.cpp

index b4e0521..54c506c 100644 (file)
@@ -46,6 +46,7 @@ static const wchar_t* _SYSTEM_COMMAND_GET_STRING = L"osp.system.command.system.g
 
 static const wchar_t* _SYSTEM_OK = L"osp.system.result.ok";
 static const wchar_t* _SYSTEM_INVALID_ARG = L"osp.system.result.invalid_arg";
+static const wchar_t* _SYSTEM_OBJ_NOT_FOUND = L"osp.system.result.obj_not_found";
 static const wchar_t* _SYSTEM_ERROR = L"osp.system.result.error";
 
 _SystemClient* _SystemClient::__pSystemClient = null;
@@ -81,9 +82,9 @@ _SystemClient::ConvertResultCode(String code)
        {
                r = E_SUCCESS;
        }
-       else if(code == _SYSTEM_INVALID_ARG)
+       else if(code == _SYSTEM_OBJ_NOT_FOUND)
        {
-               r = E_INVALID_ARG;
+               r = E_OBJ_NOT_FOUND;
        }
        return r;
 }
index dde4c2e..701b2f0 100644 (file)
@@ -436,6 +436,7 @@ _SystemInfoImpl::GetSysInfo(const String& key, String& value)
        else
        {
                r = GetFromRegistry(tizenKey, value);
+
                if(r != E_SUCCESS)
                {
                        _SystemClient* pSystemClient = _SystemClient::GetInstance();
@@ -482,7 +483,7 @@ _SystemInfoImpl::GetSysInfo(const String& key, int& value)
                        cameraCount++;
 
                value = cameraCount;
-       }       
+       }
        else
        {
                r = GetFromRegistry(tizenKey, value);
@@ -497,7 +498,7 @@ _SystemInfoImpl::GetSysInfo(const String& key, int& value)
        {
                integerList.Add(new String(key), new Integer(value));
        }
-       
+
        return r;
 }
 
@@ -556,7 +557,7 @@ _SystemInfoImpl::GetSysInfo(const String& key, UuId& value)
 
 Collection::IList*
 _SystemInfoImpl::GetSysInfoValuesN(const String& key, SystemInfoValueType type)
-{      
+{
        SetLastResult(E_OBJ_NOT_FOUND);
        return null;
 }