1use crate::{EndLine, StartLine};
2use crate::{ParseError, PathResolverError};
3
4#[derive(thiserror::Error, Debug)]
6pub enum Error {
7 #[error("parse error: {0}")]
8 Parse(#[from] ParseError),
9
10 #[error("PathResolver error: {0}")]
11 PathResolver(#[from] PathResolverError),
12
13 #[error(
14 "The diagram kind in The start keyword and the diagram kind in the end keyword are not match: start = {0:?}, end = {1:?}"
15 )]
16 DiagramKindNotMatch(StartLine, EndLine),
17
18 #[error("An end keyword is not found in PlantUmlContent: {0}")]
19 ContentUnclosed(String),
20
21 #[error("An end keyword is not found in PlantUmlContent ")]
22 IsNotBlockComment,
23
24 #[error("Unreachable: {0}")]
25 Unreachable(String),
26}