Skip to content

Commit

Permalink
Catch exceptions when enumerating possible symbols and sections
Browse files Browse the repository at this point in the history
  • Loading branch information
marip8 committed Jan 15, 2024
1 parent d009f2b commit af18f35
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions include/boost_plugin_loader/plugin_loader.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,14 @@ std::vector<std::string> PluginLoader::getAvailablePlugins(const std::string& se
{
for (const auto& library : library_names)
{
std::vector<std::string> lib_plugins = getAllAvailableSymbols(section, library, path);
plugins.insert(plugins.end(), lib_plugins.begin(), lib_plugins.end());
try
{
std::vector<std::string> lib_plugins = getAllAvailableSymbols(section, library, path);
plugins.insert(plugins.end(), lib_plugins.begin(), lib_plugins.end());
}
catch (const std::exception& /*ex*/)
{
}
}
}

Expand All @@ -230,8 +236,14 @@ std::vector<std::string> PluginLoader::getAvailableSections(bool include_hidden)
{
for (const auto& library : library_names)
{
std::vector<std::string> lib_sections = getAllAvailableSections(library, path, include_hidden);
sections.insert(sections.end(), lib_sections.begin(), lib_sections.end());
try
{
std::vector<std::string> lib_sections = getAllAvailableSections(library, path, include_hidden);
sections.insert(sections.end(), lib_sections.begin(), lib_sections.end());
}
catch (const std::exception& /*ex*/)
{
}
}
}

Expand Down

0 comments on commit af18f35

Please sign in to comment.