Skip to content

Commit 33eb847

Browse files
committed
qml: wizard: differentiate between create_storage exc types
Differentiate between the `UserFacingException` and other exceptions when creating the storage. Forward other exceptions to the reporter so they can get fixed.
1 parent 79018aa commit 33eb847

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

electrum/gui/qml/qewizard.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33

44
from PyQt6.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QObject
55

6+
from electrum.base_crash_reporter import send_exception_to_crash_reporter
67
from electrum.logging import get_logger
78
from electrum import mnemonic
89
from electrum.wizard import NewWalletWizard, ServerConnectWizard, TermsOfUseWizard
910
from electrum.storage import WalletStorage, StorageReadWriteError
10-
from electrum.util import WalletFileException
11+
from electrum.util import WalletFileException, UserFacingException
1112
from electrum.gui import messages
1213

1314
if TYPE_CHECKING:
@@ -172,9 +173,12 @@ def createStorage(self, js_data, single_password_enabled, single_password):
172173
self.path = path
173174

174175
self.createSuccess.emit()
176+
except UserFacingException as e:
177+
self._logger.debug(f"createStorage errored: {e!r}", exc_info=True)
178+
self.createError.emit(str(e))
175179
except Exception as e:
176180
self._logger.exception(f"createStorage errored: {e!r}")
177-
self.createError.emit(str(e))
181+
send_exception_to_crash_reporter(e)
178182

179183

180184
class QEServerConnectWizard(ServerConnectWizard, QEAbstractWizard):

0 commit comments

Comments
 (0)