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.
This commit is contained in:
f321x
2025-08-12 10:36:46 +02:00
parent 457a09219e
commit 2fd74c1884
+6 -2
View File
@@ -3,11 +3,12 @@ from typing import TYPE_CHECKING
from PyQt6.QtCore import pyqtProperty, pyqtSignal, pyqtSlot, QObject
from electrum.base_crash_reporter import send_exception_to_crash_reporter
from electrum.logging import get_logger
from electrum import mnemonic
from electrum.wizard import NewWalletWizard, ServerConnectWizard, TermsOfUseWizard
from electrum.storage import WalletStorage, StorageReadWriteError
from electrum.util import WalletFileException
from electrum.util import WalletFileException, UserFacingException
from electrum.gui import messages
if TYPE_CHECKING:
@@ -172,9 +173,12 @@ class QENewWalletWizard(NewWalletWizard, QEAbstractWizard):
self.path = path
self.createSuccess.emit()
except UserFacingException as e:
self._logger.debug(f"createStorage errored: {e!r}", exc_info=True)
self.createError.emit(str(e))
except Exception as e:
self._logger.exception(f"createStorage errored: {e!r}")
self.createError.emit(str(e))
send_exception_to_crash_reporter(e)
class QEServerConnectWizard(ServerConnectWizard, QEAbstractWizard):