| 28 | } |
| 29 | |
| 30 | std::unique_ptr<EngineRoot> EngineRootFactory::create(const boost::program_options::variables_map& params) |
| 31 | { |
| 32 | std::vector<PluginFactory> enginePluginFactories = loadPluginFactories<Plugin, PluginConfig>(getAllPluginFilepathsInDirectories(getDefaultPluginDirs())); |
| 33 | |
| 34 | try |
| 35 | { |
| 36 | nlohmann::json settings = readEngineSettings(params); |
| 37 | return create(enginePluginFactories, settings); |
| 38 | } |
| 39 | catch (const std::exception& e) |
| 40 | { |
| 41 | // Catch and re-throw a copy of the exception to avoid issues with exceptions crossing shared library boundaries |
| 42 | throw std::exception(e); |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | std::unique_ptr<EngineRoot> EngineRootFactory::create(const std::vector<PluginFactory>& pluginFactories, const json& settings) |
| 47 | { |
no test coverage detected