From 3305fdb3b143257d25a08c9e70fcdd8b350a19d2 Mon Sep 17 00:00:00 2001 From: awayzjj Date: Thu, 7 Mar 2024 23:59:26 +0800 Subject: [PATCH] Add test for CoreImpl::get_versions()( #23298) ### Details: - Replace `} catch (const ov::Exception& ex) {` with `} catch (const std::runtime_error& ex) {` to catch the exception. ### Tickets: - [CVS-132140](https://jira.devtools.intel.com/browse/CVS-132140) --- src/inference/src/dev/core_impl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inference/src/dev/core_impl.cpp b/src/inference/src/dev/core_impl.cpp index 63e5a747819c96..1123445f658d9d 100644 --- a/src/inference/src/dev/core_impl.cpp +++ b/src/inference/src/dev/core_impl.cpp @@ -1635,7 +1635,7 @@ std::map ov::CoreImpl::get_versions(const std::string& try { ov::Plugin plugin = get_plugin(deviceNameLocal); versions[deviceNameLocal] = plugin.get_version(); - } catch (const ov::Exception& ex) { + } catch (const std::runtime_error& ex) { std::string exception(ex.what()); if (exception.find("not registered in the OpenVINO Runtime") == std::string::npos) { throw;