parse_html/parser/
error.rs

1#[derive(Debug)]
2pub enum ParserError {
3    UnexpectedClosingTag(String, String),
4}
5
6impl std::fmt::Display for ParserError {
7    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
8        match self {
9            ParserError::UnexpectedClosingTag(tag, context) => {
10                write!(
11                    f,
12                    "Unexpected closing tag '{}' ... '{}'",
13                    tag, context
14                )
15            }
16        }
17    }
18}