mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-01-11 07:50:57 +00:00
core: improve log output for ui.Result exception (#429)
* core: improve log output for ui.Result exception updates #373 * core: avoid importing ui module
This commit is contained in:
parent
132c841752
commit
16b44b6f7b
@ -59,5 +59,9 @@ def critical(name: str, msg: str, *args: Any) -> None:
|
||||
|
||||
|
||||
def exception(name: str, exc: BaseException) -> None:
|
||||
# we are using `__class__.__name__` to avoid importing ui module
|
||||
if exc.__class__.__name__ == "Result":
|
||||
_log(name, DEBUG, "ui.Result: %s", exc.value)
|
||||
else:
|
||||
_log(name, ERROR, "exception:")
|
||||
sys.print_exception(exc)
|
||||
|
Loading…
Reference in New Issue
Block a user