Fix to catch exceptions in ODEStandAlone::run 24/183824/3 tizen_4.0
authorseolheui kim <s414.kim@samsung.com>
Wed, 11 Jul 2018 08:51:20 +0000 (17:51 +0900)
committerseolheui, kim <s414.kim@samsung.com>
Tue, 18 Dec 2018 00:38:46 +0000 (09:38 +0900)
Change-Id: I752dfda737b8e616b840cca534b12a744ee2cb43
Signed-off-by: seolheui kim <s414.kim@samsung.com>
ode/src/ode.cpp

index 2a7215382db3a5150e377799603fd2e9609b60a9..d99048ed5f12b1b8b2c5a63f1ddd7d40548161a1 100644 (file)
@@ -155,13 +155,18 @@ int ODEStandAlone::run(int argc, char *argv[])
        ::elm_init(argc, argv);
        ::elm_scale_set(1.8);
 
-       if (!strncmp(argv[1], "progress", sizeof("progress"))) {
-               if (argc < 4) {
-                       return -1;
+       try {
+               if (!strncmp(argv[1], "progress", sizeof("progress"))) {
+                       if (argc < 4) {
+                               return -1;
+                       }
+                       createProgressInterface(argv[2], argv[3]);
+               } else if (!strncmp(argv[1], "lock", sizeof("lock"))) {
+                       createPasswordInterface();
                }
-               createProgressInterface(argv[2], argv[3]);
-       } else if (!strncmp(argv[1], "lock", sizeof("lock"))) {
-               createPasswordInterface();
+       } catch (runtime::Exception &e) {
+               dlog_print(DLOG_ERROR, LOG_TAG, "Error: %s", e.what());
+               return -1;
        }
 
        ::elm_run();