sub_converter/
error.rs

1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum Error {
5    #[error("parse error: {detail}")]
6    ParseError { detail: String },
7
8    #[error("unsupported: {what}")]
9    Unsupported { what: String },
10
11    #[error("emit error: {detail}")]
12    EmitError { detail: String },
13
14    #[error("template error: {field}")]
15    TemplateError { field: String },
16
17    #[error("validation error: {reason}")]
18    ValidationError { reason: String },
19}
20
21pub type Result<T> = std::result::Result<T, Error>;