From d219e31b311973f1a66d4de76b4b6623adb13944 Mon Sep 17 00:00:00 2001 From: Tomasz Jankowski Date: Wed, 7 Feb 2024 12:19:28 +0100 Subject: [PATCH] Add ov::Exception wrapper (#869) to access its protected constructor --- modules/nvidia_plugin/src/error.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/nvidia_plugin/src/error.cpp b/modules/nvidia_plugin/src/error.cpp index a3013ecdb..6615149cf 100644 --- a/modules/nvidia_plugin/src/error.cpp +++ b/modules/nvidia_plugin/src/error.cpp @@ -11,6 +11,11 @@ namespace ov { namespace nvidia_gpu { namespace { +class OVExceptionWrapper : public ov::Exception { +public: + OVExceptionWrapper(const std::string& what) : ov::Exception(what) {} +}; + template [[gnu::cold, noreturn]] void throw_exception(const std::string& msg, const std::experimental::source_location& location) { @@ -20,7 +25,7 @@ template [[gnu::cold, noreturn]] void throw_ov_exception(const std::string& msg, const std::experimental::source_location& location) { - throw_exception(msg, location); + throw_exception(msg, location); } [[gnu::cold]] void logError(const std::string& /*msg*/, const std::experimental::source_location& /*location*/) {