aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils/dyn_load
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/dyn_load')
-rw-r--r--src/utils/dyn_load/dyn_load.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/utils/dyn_load/dyn_load.cpp b/src/utils/dyn_load/dyn_load.cpp
index 621737d0c..6d359bc01 100644
--- a/src/utils/dyn_load/dyn_load.cpp
+++ b/src/utils/dyn_load/dyn_load.cpp
@@ -23,7 +23,14 @@ Dynamically_Loaded_Library::Dynamically_Loaded_Library(
lib = ::dlopen(lib_name.c_str(), RTLD_LAZY);
if(!lib)
- throw std::runtime_error("Failed to load engine " + lib_name);
+ {
+ const char* dl_err = dlerror();
+ if(!dl_err)
+ dl_err = "Unknown error";
+
+ throw std::runtime_error("Failed to load engine " + lib_name + ": " +
+ dl_err);
+ }
#endif
}