-
Notifications
You must be signed in to change notification settings - Fork 70
Closed
Labels
A-errorArea: error reportingArea: error reportingC-questionUncertainty is involvedUncertainty is involvedM-breaking-changeMeta: Implementing or merging this will introduce a breaking change.Meta: Implementing or merging this will introduce a breaking change.
Milestone
Description
Some early expectations of ErrorKind
from nom
- Passed back through FFI to C APIs
- iirc Infer intent from
&[ErrorKind]
, inspired by another parser library (can't find where I saw this written)
Today in Winnow, none of these apply and the default error type drops ErrorKind
. It is hard to infer intent from ErrorKind
because which one is reported is an implementation detail in a lot of circumstances.
Also, ErrorKind
variants are focused on what operation failed, instead of describing the failure
- This is confusing (e.g. I keep wanting to use
ErrorKind::Eof
when an eof is found but its for when an eof isn't found) - It doesn't scale beyond built-in parsers and should not be used as a reason to add a built-in parser
AddContext
can serve a similar role, though isn't applied to built-in parsers
Where should ErrorKind
go?
Metadata
Metadata
Assignees
Labels
A-errorArea: error reportingArea: error reportingC-questionUncertainty is involvedUncertainty is involvedM-breaking-changeMeta: Implementing or merging this will introduce a breaking change.Meta: Implementing or merging this will introduce a breaking change.