diff --git a/interop/src/cpp/dynamic-loader.h b/interop/src/cpp/dynamic-loader.h index f1585b3f44a62fe1600733b73716fc0379acd3a9..f51ea33a75e8d51cd6ce296140ab457a9f1383d4 100644 --- a/interop/src/cpp/dynamic-loader.h +++ b/interop/src/cpp/dynamic-loader.h @@ -46,8 +46,7 @@ inline std::string libName(const char* lib) { inline void* loadLibrary(const std::string& libPath) { void* handle = dlopen(libPath.c_str(), RTLD_LOCAL | RTLD_NOW); if (!handle) { - fprintf(stderr, "failed to load library: %s\n", dlerror()); - exit(EXIT_FAILURE); + return nullptr; } return handle; }