-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(topic): Raise visibility of error tutorial
- Loading branch information
Showing
1 changed file
with
17 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,27 @@ | ||
//! # Custom Errors | ||
//! | ||
//! The most basic error type is [`ParserError`][crate::error::ParserError] | ||
//! 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`][crate::error::AddContext] | ||
//! - [`FromExternalError`][crate::error::FromExternalError] | ||
//! - [`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; |