Enhance the warning message.
authorSeungWon Lee <lsw2000.lee@samsung.com>
Thu, 20 Jun 2013 02:02:12 +0000 (11:02 +0900)
committerSeungWon Lee <lsw2000.lee@samsung.com>
Thu, 20 Jun 2013 02:02:12 +0000 (11:02 +0900)
Change-Id: I37b74e4b98cee096c49552282c6e4ba5fe282ca4
Signed-off-by: SeungWon Lee <lsw2000.lee@samsung.com>
src/ui/scenes/FUiScenes_SceneManagerImpl.cpp

index 1f54ba0..7ef400b 100644 (file)
@@ -200,16 +200,31 @@ _SceneManagerImpl::Construct(void)
        SysTryReturn(NID_UI_SCENES, !IsFailed(r), r, r, "[%s] Propagating.", GetErrorMessage(r));
 
        UiApp* pUiApp = UiApp::GetInstance();
-       SysTryReturn(NID_UI_SCENES, pUiApp != null, null, E_SYSTEM,
-                                "[%s] A system error has been occurred. UiApp::GetInstance failed.", GetErrorMessage(E_SYSTEM));
-       Frame* pFrame = pUiApp->GetFrameAt(0);
-       SysTryReturn(NID_UI_SCENES, pFrame != null, null, E_SYSTEM,
-                                "[%s] A system error has been occurred. pUiApp->GetFrameAt(0) return null.", GetErrorMessage(E_SYSTEM));
-       __pCorrespondFrame = pFrame;
-       _ContainerImpl* pFrameWindowImpl = _ContainerImpl::GetInstance(*__pCorrespondFrame);
-       SysTryReturn(NID_UI_SCENES, pFrameWindowImpl != null, null, E_SYSTEM,
-                                "[%s] A system error has been occurred. _ContainerImpl::GetInstance failed.", GetErrorMessage(E_SYSTEM));
-       __correspondFrameControlHandle = pFrameWindowImpl->GetCore().GetHandle();
+       if (pUiApp)
+       {
+               Frame* pFrame = pUiApp->GetFrameAt(0);
+               if (pFrame)
+               {
+                       __pCorrespondFrame = pFrame;
+                       _ContainerImpl* pFrameWindowImpl = _ContainerImpl::GetInstance(*__pCorrespondFrame);
+                       if (pFrameWindowImpl)
+                       {
+                               __correspondFrameControlHandle = pFrameWindowImpl->GetCore().GetHandle();
+                       }
+                       else
+                       {
+                               SysLog(NID_UI_SCENES, "WARNING! - Invalid Frame window. [_ContainerImpl::GetInstance failed]");
+                       }
+               }
+               else
+               {
+                       SysLog(NID_UI_SCENES, "WARNING! - Please add a Frame window before use the SceneManager. [pUiApp->GetFrameAt(0) return null]");
+               }
+       }
+       else
+       {
+               SysLog(NID_UI_SCENES, "WARNING! - Please check the application type. SceneManager is valid only Ui-Application. [UiApp::GetInstance failed]");
+       }
 
        return E_SUCCESS;
 }