change exception when camera feature fail
authorjs1002.kim <js1002.kim@samsung.com>
Fri, 29 Mar 2013 11:11:12 +0000 (20:11 +0900)
committerjs1002.kim <js1002.kim@samsung.com>
Fri, 29 Mar 2013 11:11:12 +0000 (20:11 +0900)
Change-Id: I57dcef139246bc8457bee004c2e6e250cf9d004d
Signed-off-by: js1002.kim <js1002.kim@samsung.com>
src/FMedia_CameraImpl.cpp

index d91aa1f..1a5e222 100755 (executable)
@@ -291,7 +291,7 @@ _CameraImpl::Construct(ICameraEventListener& listener, CameraSelection camSel)
 
        r = pCapabilityImpl->GetValue(L"Camera.Count", cameraCount);
        SysTryReturn(NID_MEDIA, r == E_SUCCESS, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error has been occurred. Number of Camera was not obtained.");
-       SysTryReturn(NID_MEDIA, camSel < cameraCount, E_DEVICE_UNAVAILABLE, E_DEVICE_UNAVAILABLE, "[E_DEVICE_UNAVAILABLE] The camSel(%d)  is not available.", camSel);
+       SysTryReturn(NID_MEDIA, camSel < cameraCount, E_UNSUPPORTED_OPERATION, E_UNSUPPORTED_OPERATION, "[E_UNSUPPORTED_OPERATION] The camSel(%d)  is not available.", camSel);
        __selection = camSel;
 
        // Get the _CameraCapability.
@@ -352,6 +352,7 @@ _CameraImpl::Construct(ICameraEventListener& listener, CameraSelection camSel)
        // Get the _CameraCoordinator
        __pCoordinator = _CameraCoordinator::AddInstance(__deviceType);
        r = GetLastResult();
+       // To do : return should be checked. (E_DEVICE_UNAVAILABLE or E_DEVICE_BUSY)
        SysTryCatch(NID_MEDIA, __pCoordinator != null, , r, "[E_OBJ_NOT_FOUND] _CameraCoordinator instance is not available.");
 
        // Add this to _CameraCoordinator