mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-06-27 10:22:34 +00:00
fix(core): update exception name in layout shutdown reporting
also return after the exception branch, so that the "value" is not reported twice, once as an exception and a second time as a "non-none return"
This commit is contained in:
parent
bd342b3ab7
commit
2ee0f7028c
@ -443,7 +443,7 @@ class Layout(Generic[T]):
|
|||||||
return
|
return
|
||||||
|
|
||||||
if isinstance(value, BaseException):
|
if isinstance(value, BaseException):
|
||||||
if __debug__ and value.__class__.__name__ != "UnexpectedMessage":
|
if __debug__ and value.__class__.__name__ != "UnexpectedMessageException":
|
||||||
log.error(
|
log.error(
|
||||||
__name__, "UI task died: %s (%s)", task, value.__class__.__name__
|
__name__, "UI task died: %s (%s)", task, value.__class__.__name__
|
||||||
)
|
)
|
||||||
@ -451,6 +451,7 @@ class Layout(Generic[T]):
|
|||||||
self._emit_message(value)
|
self._emit_message(value)
|
||||||
except Shutdown:
|
except Shutdown:
|
||||||
pass
|
pass
|
||||||
|
return
|
||||||
|
|
||||||
if __debug__:
|
if __debug__:
|
||||||
log.error(__name__, "UI task returned non-None: %s (%s)", task, value)
|
log.error(__name__, "UI task returned non-None: %s (%s)", task, value)
|
||||||
|
Loading…
Reference in New Issue
Block a user