Skip to content

Commit

Permalink
update(plugin-load): Adding print for dlopen fail
Browse files Browse the repository at this point in the history
  • Loading branch information
skuzzis committed Nov 16, 2023
1 parent 0fc217e commit 93807b9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/Plugins/inc/Plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ class Plugin
this->m_hModule = dlmount(this->m_path.c_str());
#else
this->m_hModule = dlopen(string_format("%s/%s", std::filesystem::current_path().string().c_str(), this->m_path.c_str()).c_str(), RTLD_LAZY);

if (!this->m_hModule)
{
PRINTF("LoadPlugin", "Failed to load module: %s\n", std::string(dlerror()).c_str());
}
#endif
PRINT("LoadPlugin", string_format("%s/%s\nhModule addr: %p\n", std::filesystem::current_path().string().c_str(), this->m_path.c_str(), this->m_hModule).c_str());

Expand Down

0 comments on commit 93807b9

Please sign in to comment.