sxd_html/
error.rs

1#[derive(Debug)]
2pub struct Error(u64, String);
3impl Error {
4    pub(crate) fn new(line: u64, msg: impl Into<String>) -> Self {
5        Self(line, msg.into())
6    }
7}
8
9impl std::fmt::Display for Error {
10    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
11        write!(f, "sxd_html error at line {} : {}", self.0, self.1)
12    }
13}
14
15impl std::error::Error for Error {}