Crate context_error

Crate context_error 

Source
Expand description

Contain the definition for errors with all additional data that is needed to generate nice error messages

Structs§

BoxedError
An error. Stored as a pointer to a structure on the heap to prevent large sizes which could be detrimental to performance for the happy path.
CombineErrors
An iterator adapter that keeps track separately of the errors to merge ones that can be merged. The errors have to be retrieved separately using Self::errors.
Context
A context construct to indicate a context presumably in a file, but could be in any kind of source text
CustomError
FilePosition
A position in a file for use in parsing/lexing
Highlight
A highlight on a single line. The easiest way of creating these is by using the From implementations.

Enums§

BasicKind

Traits§

CombineErrorsExtender
An iterator adapter that keeps track separately of the errors to merge ones that can be merged. The errors have to be retrieved separately using [Self::errors].
CreateError
A trait to guarantee identical an API between the boxed and unboxed error version
ErrorKind
The kind of an error
FullErrorContent
A structure that contains all error content
StaticErrorContent
A structure that contains basic error content

Functions§

combine_error
Combine a new error into a stack of existing errors. This merges errors that can be merged to be able to show a terser error if the same error happened multiple times in the same file.
combine_errors
Combine a list full of error into the list of already existing errors.