Crate rich_err

Crate rich_err 

Source
Expand description

Provides a highly detailed error type designed for:

  • Compilers (or anything similar)
  • Tracebacks
  • Any situation where a source file would provide valuable context for the user

This serves as a sort of wrapper around ariadne, although it is missing much of ariadne’s functionality. The point is to have a simple interface for constructing error reports that works well enough for sufficiently simple applications.

As a word of caution, this higher level of detail comes at the cost of higher memory usage. The RichError struct alone is around 7 times larger than a String, and some features may incur extra heap allocations as well. Thus, it is not advisable to use rich errors unless an ordinary error is truly insufficient.

Re-exports§

pub use error_code::ErrorCode;
pub use error_code::ToErrorCode;
pub use label::Label;
pub use note::Note;
pub use span::Span;

Modules§

error_code
label
note
Notes provide a clean and easy way to make error messages more useful to the user.
span

Structs§

RichError
A highly detailed error type designed for:

Type Aliases§

RichResult