1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-03-02 16:26:19 +00:00

chore(core): improve error message

[no changelog]
This commit is contained in:
Ioan Bizău 2025-01-21 09:55:56 +01:00 committed by Ioan Bizău
parent 50879cd4da
commit 5282321fba

View File

@ -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)