mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-02-28 07:12:28 +00:00
chore(core): improve error message
[no changelog]
This commit is contained in:
parent
31f2eb06dc
commit
ec397fedd3
@ -62,7 +62,9 @@ class ProtobufMapping:
|
|||||||
"""
|
"""
|
||||||
wire_type = self.class_to_type_override.get(type(msg), msg.MESSAGE_WIRE_TYPE)
|
wire_type = self.class_to_type_override.get(type(msg), msg.MESSAGE_WIRE_TYPE)
|
||||||
if wire_type is None:
|
if wire_type is None:
|
||||||
raise ValueError("Cannot encode class without wire type")
|
raise ValueError(
|
||||||
|
f'Cannot encode class "{type(msg).__name__}" without wire type'
|
||||||
|
)
|
||||||
|
|
||||||
buf = io.BytesIO()
|
buf = io.BytesIO()
|
||||||
protobuf.dump_message(buf, msg)
|
protobuf.dump_message(buf, msg)
|
||||||
|
Loading…
Reference in New Issue
Block a user