Skip to content

Recover the buffer position when type handler throws, for sequential read #3648

@Emill

Description

@Emill

As noted in #3646 (comment), the data reader doesn't handle when a TypeHandler throws an error in sequential mode, in case the buffer has advanced to next chunk of data. This is because the reader currently can't know how many bytes that have been processed. I see two options:

  1. Force type handlers to skip data to the end after throwing an error. Works for explicitly thrown errors but not for unexpected exceptions (bugs).
  2. Introduce an ulong (or 128-bit?) in the buffer class that accumulates the number of bytes read so we can know the exact position.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions