notedown-error 1.1.10

Notedown Error Handlers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::{DiagnosticLevel, NoteError, NoteErrorKind};
use html_parser::Error;

impl From<Error> for NoteError {
    fn from(e: Error) -> Self {
        let kind = match e {
            Error::Parsing(e) => NoteErrorKind::SyntaxError(e),
            Error::IO(e) => NoteErrorKind::IOError(e),
            Error::Cli(_) => {
                unimplemented!()
            }
            Error::Serde(_) => {
                unimplemented!()
            }
        };
        Self { kind: Box::new(kind), level: DiagnosticLevel::None, file: None, range: None }
    }
}