Skip to content

Commit

Permalink
add warning if getmodulename is incorrect
Browse files Browse the repository at this point in the history
  • Loading branch information
fredroy committed Jan 15, 2024
1 parent 55f78fe commit a0faa0b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,14 @@ bool RequiredPlugin::loadPlugin()
// Register Objects explicitely
// Here we only have access to the path, so we need to find the Plugin from it
const auto* plugin = pluginManager.getPluginByName(name);
sofa::core::ObjectFactory::getInstance()->registerObjectsFromPlugin(*plugin);
if (plugin) // can be nullptr if getModuleName is not (or badly) set
{
sofa::core::ObjectFactory::getInstance()->registerObjectsFromPlugin(*plugin);
}
else
{
msg_error() << "Could not register objects for " << name << "; check if getModuleName matches the given name.";
}
if (d_stopAfterFirstSuffixFound.getValue()) break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ void initExternalModule()

const char* getModuleName()
{
return "Plugin Sensable Emulation";
return "SensableEmulation";
}

const char* getModuleVersion()
Expand Down

0 comments on commit a0faa0b

Please sign in to comment.