From ec397fedd3570028e3e86511c31bbbcf9f353859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ioan=20Biz=C4=83u?= Date: Tue, 21 Jan 2025 09:55:56 +0100 Subject: [PATCH] chore(core): improve error message [no changelog] --- python/src/trezorlib/mapping.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python/src/trezorlib/mapping.py b/python/src/trezorlib/mapping.py index d50324d586..532277078f 100644 --- a/python/src/trezorlib/mapping.py +++ b/python/src/trezorlib/mapping.py @@ -62,7 +62,9 @@ class ProtobufMapping: """ 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)