Skip to content

Commit

Permalink
chore(core): improve error message
Browse files Browse the repository at this point in the history
[no changelog]
  • Loading branch information
ibz committed Jan 21, 2025
1 parent 339471f commit 6806267
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/src/trezorlib/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ def encode(self, msg: protobuf.MessageType) -> Tuple[int, bytes]:
"""
wire_type = self.class_to_type_override.get(type(msg), msg.MESSAGE_WIRE_TYPE)
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()
protobuf.dump_message(buf, msg)
Expand Down

0 comments on commit 6806267

Please sign in to comment.