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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user