Skip to content

Commit

Permalink
Add to log message which plugin failed to load.
Browse files Browse the repository at this point in the history
This changes a message like:

[wayfire.git/src/core/plugin-loader.cpp:87] error loading plugin: /usr/lib/libcwd_r.so.9: undefined symbol: elf_nextscn

into:

[wayfire.git/src/core/plugin-loader.cpp:87] error loading plugin [/usr/lib/wayfire/libpixdecor.so]: /usr/lib/libcwd_r.so.9: undefined symbol: elf_nextscn

In other words, not just print the dlerror, but print which plugin
failed to load.
  • Loading branch information
CarloWood committed Feb 14, 2025
1 parent 2fbf977 commit d2a6cf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/plugin-loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ std::pair<void*, void*> wf::get_new_instance_handle(const std::string& path)
void *handle = dlopen(path.c_str(), RTLD_NOW | RTLD_GLOBAL);
if (handle == NULL)
{
LOGE("error loading plugin: ", dlerror());
LOGE("error loading plugin [", path, "]: ", dlerror());
return {nullptr, nullptr};
}

Expand Down

0 comments on commit d2a6cf6

Please sign in to comment.