plugins: somewhat clearer exception is loading plugin fails
see #4817 (issuecomment-434778055)
This commit is contained in:
@@ -100,8 +100,11 @@ class Plugins(DaemonThread):
|
|||||||
if not loader:
|
if not loader:
|
||||||
raise RuntimeError("%s implementation for %s plugin not found"
|
raise RuntimeError("%s implementation for %s plugin not found"
|
||||||
% (self.gui_name, name))
|
% (self.gui_name, name))
|
||||||
p = loader.load_module()
|
try:
|
||||||
plugin = p.Plugin(self, self.config, name)
|
p = loader.load_module()
|
||||||
|
plugin = p.Plugin(self, self.config, name)
|
||||||
|
except Exception as e:
|
||||||
|
raise Exception(f"Error loading {name} plugin: {e}") from e
|
||||||
self.add_jobs(plugin.thread_jobs())
|
self.add_jobs(plugin.thread_jobs())
|
||||||
self.plugins[name] = plugin
|
self.plugins[name] = plugin
|
||||||
self.print_error("loaded", name)
|
self.print_error("loaded", name)
|
||||||
|
|||||||
Reference in New Issue
Block a user