Update exception handling in PluginManager.discover()