From 094c58cd459255a2a1636b075d9c8fce73104e17 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Thu, 25 Jan 2024 15:05:20 -0600 Subject: [PATCH] docs(topic): Raise visibility of error tutorial --- src/_topic/error.rs | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/_topic/error.rs b/src/_topic/error.rs index c5374b4a..8a401b47 100644 --- a/src/_topic/error.rs +++ b/src/_topic/error.rs @@ -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;