Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion EosLib/packet/packet.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ def decode(packet_bytes: bytes):
decoded_data_header = decoded_data_header
packet_bytes = packet_bytes[struct.calcsize(DataHeader.data_header_struct_format_string):]
else:
raise PacketFormatError("Packet does not contain a header")
raise PacketFormatError(f"Packet does not contain a header. Unexpected packet header: {packet_bytes[0]}, \
should be: {HeaderPreamble.DATA}")

decoded_packet = Packet(EosLib.format.decode_factory.decode_factory.decode(decoded_data_header.data_type,
packet_bytes),
Expand Down