1use std::error::Error;
2use std::fmt::Display;
3
4#[derive(Debug)]
6#[non_exhaustive]
7pub enum ParseError {
8 MissingEndTag(#[doc(hidden)] String),
9 UnexpectedEndTag(#[doc(hidden)] String),
10}
11
12impl Display for ParseError {
13 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
14 match self {
15 Self::MissingEndTag(name) => write!(f, "missing end tag: `{name}`"),
16 Self::UnexpectedEndTag(name) => write!(f, "unexpected end tag: `{name}`"),
17 }
18 }
19}
20
21impl Error for ParseError {}