[−][src]Module nom::error
Error management
Depending on a compilation flag, the content of the Context
enum
can change. In the default case, it will only have one variant:
Context::Code(I, ErrorKind<E=u32>)
(with I
and E
configurable).
It contains an error code and the input position that triggered it.
Structs
VerboseError | this error type accumulates errors and their position when backtracking
through a parse tree. With some post processing (cf |
Enums
ErrorKind | indicates which parser returned an error |
VerboseErrorKind | error context for |
Traits
ParseError | this trait must be implemented by the error type of a nom parser |
Functions
append_error | combines an existing error with a new one created from the input positionsition and an ErrorKind. This is useful when backtracking through a parse tree, accumulating error context on the way |
context | create a new error from an input position, a static string and an existing error. This is used mainly in the context combinator, to add user friendly information to errors when backtracking through a parse tree |
convert_error | transforms a |
error_to_u32 | converts an ErrorKind to a number |
make_error | creates an error from the input position and an ErrorKind |