Skip to content

Commit

Permalink
docs(topic): Raise visibility of error tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Jan 25, 2024
1 parent bc1c103 commit 094c58c
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/_topic/error.rs
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;

0 comments on commit 094c58c

Please sign in to comment.