From 0862fdb9a9082f78a78dfb566e46b1428d6f5c26 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Wed, 31 Oct 2018 18:33:28 +0100 Subject: [PATCH] plugins: somewhat clearer exception is loading plugin fails see #4817 (issuecomment-434778055) --- electrum/plugin.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/electrum/plugin.py b/electrum/plugin.py index b9521cfdc..d8935d829 100644 --- 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)