diff --git a/libsyclinterface/helper/include/dpctl_dynamic_lib_helper.h b/libsyclinterface/helper/include/dpctl_dynamic_lib_helper.h index b319ec6a2b..f4f5203987 100644 --- a/libsyclinterface/helper/include/dpctl_dynamic_lib_helper.h +++ b/libsyclinterface/helper/include/dpctl_dynamic_lib_helper.h @@ -38,6 +38,7 @@ #endif // __linux__ +#include "dpctl_error_handlers.h" #include namespace dpctl @@ -76,12 +77,18 @@ class DynamicLibHelper final char *error = dlerror(); if (nullptr != error) { + error_handler("Could not retrieve symbol " + std::string(symName) + + ". Error encountered: " + std::string(error), + __FILE__, __func__, __LINE__); return nullptr; } #elif defined(_WIN32) || defined(_WIN64) void *sym = (void *)GetProcAddress((HMODULE)_handle, symName); if (nullptr == sym) { + error_handler("Could not retrieve symbol " + std::string(symName) + + ".", + __FILE__, __func__, __LINE__); return nullptr; } #endif