rlsp_yaml_parser/error.rs
1// SPDX-License-Identifier: MIT
2
3use crate::pos::Pos;
4
5/// A parse error produced by the streaming parser.
6#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
7#[error("parse error at {pos:?}: {message}")]
8pub struct Error {
9 /// Source position where the parse error was detected.
10 pub pos: Pos,
11 /// Human-readable description of the error.
12 pub message: String,
13}