File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed
render_pipeline/rpcore/pluginbase Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -87,9 +87,9 @@ class RENDER_PIPELINE_DECL PluginManager: public RPObject
8787 /* * Initializes all plugin settings as a define, so they can be queried in a shader. */
8888 void init_defines (void );
8989
90- size_t get_enabled_plugins_count (void ) const ;
90+ size_t get_enabled_plugins_count (void ) const NOEXCEPT ;
9191
92- const BasePlugin::PluginInfo& get_plugin_info (const std::string& plugin_id) const ;
92+ const BasePlugin::PluginInfo& get_plugin_info (const std::string& plugin_id) const NOEXCEPT ;
9393 const SettingsDataType& get_setting (const std::string& setting_id) const ;
9494 const std::unordered_map<std::string, DaySettingsDataType>& get_day_settings (void ) const ;
9595
Original file line number Diff line number Diff line change @@ -378,7 +378,7 @@ const std::shared_ptr<BasePlugin>& PluginManager::get_instance(const std::string
378378 return impl_->instances_ .at (plugin_id);
379379}
380380
381- size_t PluginManager::get_enabled_plugins_count (void ) const
381+ size_t PluginManager::get_enabled_plugins_count (void ) const NOEXCEPT
382382{
383383 return impl_->enabled_plugins_ .size ();
384384}
@@ -388,9 +388,18 @@ const PluginManager::SettingsDataType& PluginManager::get_setting(const std::str
388388 return impl_->settings_ .at (setting_id);
389389}
390390
391- const BasePlugin::PluginInfo& PluginManager::get_plugin_info (const std::string& plugin_id) const
391+ const BasePlugin::PluginInfo& PluginManager::get_plugin_info (const std::string& plugin_id) const NOEXCEPT
392392{
393- return impl_->plugin_info_map_ .at (plugin_id);
393+ try
394+ {
395+ return impl_->plugin_info_map_ .at (plugin_id);
396+ }
397+ catch (...)
398+ {
399+ static const BasePlugin::PluginInfo null;
400+ error (fmt::format (" Plugin ({}) does NOT exist!" , plugin_id));
401+ return null;
402+ }
394403}
395404
396405const std::unordered_map<std::string, PluginManager::DaySettingsDataType>& PluginManager::get_day_settings (void ) const
You can’t perform that action at this time.
0 commit comments