ut_main : Fix uncaught exception 94/277294/3 accepted/tizen/unified/20220706.120445 submit/tizen/20220705.053326
authorHaesu Gwon <haesu.gwon@samsung.com>
Tue, 5 Jul 2022 00:07:04 +0000 (09:07 +0900)
committerHaesu Gwon <haesu.gwon@samsung.com>
Tue, 5 Jul 2022 03:57:35 +0000 (12:57 +0900)
[Version] 0.0.14
[Issue Type] COVERITY defect fix

Change-Id: I6eb07449cd9836c002739eca8ee31ab8e6e9bbb1

gtest/ut_main.cpp
packaging/capi-media-editor.spec

index 9a196578a660a9598bd060fab5df39bec66e958b..d84a5b4fe0411f1dbef5f462780c315006ff4c18 100644 (file)
 
 #include "gtest/gtest.h"
 
-int main(int argc, char *argv[]) {
-  ::testing::InitGoogleTest(&argc, argv);
-
-  auto ret = -1;
-  ret = RUN_ALL_TESTS();
-
-  return ret;
+int main(int argc, char *argv[])
+{
+    try {
+        ::testing::InitGoogleTest(&argc, argv);
+        return RUN_ALL_TESTS();
+    } catch (const std::exception &e) {
+        std::cout << "caught exception: " << e.what() << std::endl;
+        return -1;
+    }
 }
index 0fc31858a17d67f3b976af4a07e1bd932cdfd24c..9a799ada05f5d931ea4c00d41608e346d03a153f 100644 (file)
@@ -1,6 +1,6 @@
 Name:       capi-media-editor
 Summary:    A Tizen Media Editor API
-Version:    0.0.13
+Version:    0.0.14
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0