forge_doc/parser/
error.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use forge_fmt::FormatterError;
use thiserror::Error;

/// The parser error.
#[derive(Debug, Error)]
#[error(transparent)]
pub enum ParserError {
    /// Formatter error.
    #[error(transparent)]
    Formatter(#[from] FormatterError),
    /// Internal parser error.
    #[error(transparent)]
    Internal(#[from] eyre::Error),
}

/// The parser result.
pub type ParserResult<T, E = ParserError> = std::result::Result<T, E>;