1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-03-24 03:55:44 +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:
matejcik 2025-02-12 10:17:28 +01:00 committed by matejcik
parent bd342b3ab7
commit 2ee0f7028c

View File

@ -443,7 +443,7 @@ class Layout(Generic[T]):
return
if isinstance(value, BaseException):
if __debug__ and value.__class__.__name__ != "UnexpectedMessage":
if __debug__ and value.__class__.__name__ != "UnexpectedMessageException":
log.error(
__name__, "UI task died: %s (%s)", task, value.__class__.__name__
)
@ -451,6 +451,7 @@ class Layout(Generic[T]):
self._emit_message(value)
except Shutdown:
pass
return
if __debug__:
log.error(__name__, "UI task returned non-None: %s (%s)", task, value)