tplugins: somewhat clearer exception is loading plugin fails - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 0862fdb9a9082f78a78dfb566e46b1428d6f5c26 DIR parent 386e0d560eee1ad82380c4000d2afa8e6a07963c HTML 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: M electrum/plugin.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) --- DIR diff --git a/electrum/plugin.py b/electrum/plugin.py t@@ -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)