Don't throw exception in dtor 08/106208/1
authorKyungwook Tak <k.tak@samsung.com>
Wed, 21 Dec 2016 04:23:09 +0000 (13:23 +0900)
committerKyungwook Tak <k.tak@samsung.com>
Wed, 21 Dec 2016 04:29:17 +0000 (13:29 +0900)
Change-Id: I52b7dfbe177b3c67bcc4529d9871736dfd9492db
Signed-off-by: Kyungwook Tak <k.tak@samsung.com>
test/internals/test-main.cpp
test/test-common.h

index 9ba5318..c9c16b3 100644 (file)
@@ -68,15 +68,8 @@ struct Initializer {
                if (!isEngineInitialized)
                        return;
 
-               int ret = csre_cs_global_deinitialize();
-
-               if (ret != CSRE_ERROR_NONE)
-                       throw std::logic_error("Failed to deinit content screening engine.");
-
-               ret = csre_wp_global_deinitialize();
-
-               if (ret != CSRE_ERROR_NONE)
-                       throw std::logic_error("Failed to deinit web protection engine.");
+               csre_cs_global_deinitialize();
+               csre_wp_global_deinitialize();
 
                BOOST_MESSAGE("Deinitialize engines");
        }
index 7ea1c01..cdec29a 100644 (file)
@@ -223,9 +223,7 @@ public:
 
        ~ScopedChDir()
        {
-               if (::chdir(cdbuf) == -1)
-                       throw std::system_error(errno, std::system_category(),
-                                                                       std::string(cdbuf) + " chdir failed");
+               ::chdir(cdbuf);
        }
 
 private: