diff --git a/interfaces/innerkits/appverify/BUILD.gn b/interfaces/innerkits/appverify/BUILD.gn index 19b15c909fa88d9ea68b2b5e0408d3ba9b030d08..2e29775564185433e9a93e93c2b625a24c814330 100644 --- a/interfaces/innerkits/appverify/BUILD.gn +++ b/interfaces/innerkits/appverify/BUILD.gn @@ -17,7 +17,6 @@ if (os_level == "standard") { config("libhapverify_config") { visibility = [ ":*" ] include_dirs = [ "include" ] - configs = [ "//build/config/compiler:exceptions" ] } ohos_shared_library("libhapverify") { @@ -61,7 +60,6 @@ if (os_level == "standard") { cflags_cc = [ "-DHILOG_ENABLE", "-fvisibility=hidden", - "-fexceptions", ] deps = [] @@ -100,6 +98,8 @@ if (os_level == "standard") { if (is_emulator) { defines += [ "X86_EMULATOR_MODE" ] } + + use_exceptions = true } } else { group("libhapverify") { diff --git a/interfaces/innerkits/appverify/src/verify/hap_verify_v2.cpp b/interfaces/innerkits/appverify/src/verify/hap_verify_v2.cpp index 3d88fddb16fc724db08b3a199519c69286975b9b..fe94ebecea49a36e2019bc224362af70f1c77c47 100644 --- a/interfaces/innerkits/appverify/src/verify/hap_verify_v2.cpp +++ b/interfaces/innerkits/appverify/src/verify/hap_verify_v2.cpp @@ -77,9 +77,6 @@ bool HapVerifyV2::CheckFilePath(const std::string& filePath, std::string& standa } catch(const std::regex_error& e) { HAPVERIFY_LOG_ERROR("regex match error"); return false; - } catch(...) { - HAPVERIFY_LOG_ERROR("unexpected error"); - return false; } return true; }