tQt: catch exception raised by load_wallet - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit b69cb213335481aeb3d7d9363d4871159d427d51 DIR parent b16800864b3acf29fc9487e64ef3f3ad986d3237 HTML Author: ThomasV <thomasv@electrum.org> Date: Sat, 7 Jan 2017 08:57:25 +0100 Qt: catch exception raised by load_wallet Diffstat: M gui/qt/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) --- DIR diff --git a/gui/qt/__init__.py b/gui/qt/__init__.py t@@ -159,8 +159,12 @@ class ElectrumGui: w.bring_to_top() break else: - wallet = self.daemon.load_wallet(path) - if not wallet: + try: + wallet = self.daemon.load_wallet(path) + except BaseException as e: + QMessageBox.information(None, _('Error'), str(e), _('OK')) + return + if wallet is None: wizard = InstallWizard(self.config, self.app, self.plugins, path) wallet = wizard.run_and_get_wallet() if not wallet: