From 2c541d2663a2e5779ecd8aaf9f8886b98e241804 Mon Sep 17 00:00:00 2001 From: f321x Date: Mon, 23 Mar 2026 10:14:31 +0100 Subject: [PATCH] qt: ElectrumGui: repr(UserFacingException) -> str() Show UserFacingException in ElectrumGui.start_new_window as str() to the user, ther doesn't seem to be a good reason to show its repr? --- electrum/gui/qt/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/electrum/gui/qt/__init__.py b/electrum/gui/qt/__init__.py index c0835744a..9c151542c 100644 --- a/electrum/gui/qt/__init__.py +++ b/electrum/gui/qt/__init__.py @@ -413,11 +413,10 @@ class ElectrumGui(BaseElectrumGui, Logger): self.logger.exception('') if isinstance(e, UserFacingException) \ or isinstance(e, WalletFileException) and not e.should_report_crash: - err_text = str(e) if isinstance(e, WalletFileException) else repr(e) custom_message_box(icon=QMessageBox.Icon.Warning, parent=None, title=_('Error'), - text=_('Cannot load wallet') + '(2) :\n' + err_text) + text=_('Cannot load wallet') + '(2) :\n' + str(e)) else: send_exception_to_crash_reporter(e) if app_is_starting: