Browse Source
plugins: somewhat clearer exception is loading plugin fails
see #4817 (issuecomment-434778055)
3.3.3.1
SomberNight
6 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
1 changed files with
5 additions and
2 deletions
-
electrum/plugin.py
|
@ -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) |
|
|