wrt-plugins-tizen_0.4.23
[framework/web/wrt-plugins-tizen.git] / src / Power / test / main.cpp
index 6e3683e..385b7b6 100755 (executable)
@@ -63,7 +63,12 @@ int main(int argc, char** argv){
 
     DPL::Log::LogSystemSingleton::Instance().SetTag("STANDALONE");
     //DPL::Event::GetMainEventDispatcherInstance().ResetCrossEventCallHandler();
-    WrtAccessSingleton::Instance().initialize(0);
+    try{
+        WrtAccessSingleton::Instance().initialize(0);
+    }catch(...){
+        printf("ERROR: Cannot init WrtAccessSingleton\n");
+        return -1;
+    }
 
 
     StandaloneConsole console;
@@ -72,7 +77,7 @@ int main(int argc, char** argv){
     console.registModule("power", JSPowerManager::getClassRef(), NULL);
 
     if( argc > 1 ){
-        for(unsigned int i = 1 ; i< argc; i++){
+        for(unsigned int i = 1 ; i< (unsigned int)argc; i++){
             console.RunScript(argv[i]);
         }
     }