blob: 8a401b47b39f3a3e23f7550b508aba09726be9cb [file] [log] [blame]
//! # Custom Errors
//!
//! Between [`ContextError`], [`Parser::context`], and [`cut_err`],
//! most error needs will likely be met
//! (see [tutorial][chapter_6]).
//! When that isn't the case, you can implement your own error type.
//!
//! The most basic error trait is [`ParserError`].
//!
//! Optional traits include:
//! - [`AddContext`]
//! - [`FromExternalError`]
//!
//! # Example
//!
//!```rust
#![doc = include_str!("../../examples/custom_error.rs")]
//!```
#![allow(unused_imports)]
use crate::combinator::cut_err;
use crate::error::ContextError;
use crate::Parser;
use crate::_tutorial::chapter_6;
use crate::error::AddContext;
use crate::error::FromExternalError;
use crate::error::ParserError;