deku
deku copied to clipboard
Feature request: Have DekuError give position of errors when possible
Unfortunately, the smallest example I have of the binary format I am currently trying to parse is several megabytes in size, and so it is very hard to find the exact location of an error like Parse error: Missing magic value [80, 71]
when this occurs at the start of each of several thousand records.
I haven't looked into the implementation, but based on my experience working with parsers it shouldn't be especially hard to add at the very least a byte offset into the input at which the error occurred.