electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 0862fdb9a9082f78a78dfb566e46b1428d6f5c26
parent 386e0d560eee1ad82380c4000d2afa8e6a07963c
Author: SomberNight <somber.night@protonmail.com>
Date:   Wed, 31 Oct 2018 18:33:28 +0100

plugins: somewhat clearer exception is loading plugin fails

see #4817 (issuecomment-434778055)

Diffstat:
Melectrum/plugin.py | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/electrum/plugin.py b/electrum/plugin.py @@ -100,8 +100,11 @@ class Plugins(DaemonThread): if not loader: raise RuntimeError("%s implementation for %s plugin not found" % (self.gui_name, name)) - p = loader.load_module() - plugin = p.Plugin(self, self.config, name) + try: + 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.plugins[name] = plugin self.print_error("loaded", name)