mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 07:28:10 +00:00
core: return exception details in debug mode (#238)
This commit is contained in:
parent
ebc22e5ccb
commit
a4c0645622
@ -173,11 +173,12 @@ async def protobuf_workflow(ctx, reader, handler, *args):
|
||||
# respond with specific code and message
|
||||
await ctx.write(Failure(code=exc.code, message=exc.message))
|
||||
raise
|
||||
except Exception:
|
||||
except Exception as e:
|
||||
# respond with a generic code and message
|
||||
await ctx.write(
|
||||
Failure(code=FailureType.FirmwareError, message="Firmware error")
|
||||
)
|
||||
message = "Firmware error"
|
||||
if __debug__:
|
||||
message = "{}: {}".format(type(e), e)
|
||||
await ctx.write(Failure(code=FailureType.FirmwareError, message=message))
|
||||
raise
|
||||
if res:
|
||||
# respond with a specific response
|
||||
|
Loading…
Reference in New Issue
Block a user