Add some extra debug output during a crash
This should be temporary and help with getting the relevant raw item data to debug and write tests
This commit is contained in:
@@ -411,7 +411,13 @@ def parse_items(data: bytes) -> list[Item]:
|
||||
|
||||
items: list[Item] = []
|
||||
while data:
|
||||
data, item = parse_item(data)
|
||||
try:
|
||||
data, item = parse_item(data)
|
||||
except:
|
||||
print("parse_item crashed with", data.hex())
|
||||
if items:
|
||||
print("previous item was", items[-1].raw_data.hex())
|
||||
raise
|
||||
items.append(item)
|
||||
|
||||
# TODO: check if num == len(items)
|
||||
|
||||
Reference in New Issue
Block a user