diff options
Diffstat (limited to 'src/utils/dyn_load/dyn_load.cpp')
-rw-r--r-- | src/utils/dyn_load/dyn_load.cpp | 9 |
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 } |