QT install wizard: catch general exceptions
and show an error before re-raising and exiting. Improvement on prior.
This commit is contained in:
parent
297e89db5c
commit
4ea9518aef
|
@ -166,6 +166,9 @@ class InstallWizard(QDialog, MessageBoxMixin, WizardBase):
|
||||||
except UserCancelled:
|
except UserCancelled:
|
||||||
self.print_error("wallet creation cancelled by user")
|
self.print_error("wallet creation cancelled by user")
|
||||||
self.accept() # For when called from menu
|
self.accept() # For when called from menu
|
||||||
|
except BaseException as e:
|
||||||
|
self.show_error(str(e))
|
||||||
|
raise
|
||||||
return wallet
|
return wallet
|
||||||
|
|
||||||
def remove_from_recently_open(self, filename):
|
def remove_from_recently_open(self, filename):
|
||||||
|
|
|
@ -221,8 +221,7 @@ class TrezorCompatiblePlugin(HW_PluginBase):
|
||||||
devmgr = self.device_manager()
|
devmgr = self.device_manager()
|
||||||
device_info = devmgr.select_device(wallet, self)
|
device_info = devmgr.select_device(wallet, self)
|
||||||
if not device_info:
|
if not device_info:
|
||||||
wallet.handler.show_error(_("No devices found"))
|
raise RuntimeError(_("No devices found"))
|
||||||
raise RuntimeError("No devices found")
|
|
||||||
devmgr.pair_wallet(wallet, device_info.device.id_)
|
devmgr.pair_wallet(wallet, device_info.device.id_)
|
||||||
if device_info.initialized:
|
if device_info.initialized:
|
||||||
task = partial(wallet.create_hd_account, None)
|
task = partial(wallet.create_hd_account, None)
|
||||||
|
|
Loading…
Reference in New Issue