wirdigen/error.rs
1//! Enum of possible error returned by modules
2
3use thiserror::Error;
4
5#[derive(Error, Debug)]
6pub enum WirdigenError {
7 /// Error inherited from std::io::Error
8 #[error(transparent)]
9 IOError(#[from] std::io::Error),
10
11 /// Error inherited from serde_json::Error
12 #[error(transparent)]
13 SerdeJsonError(#[from] serde_json::Error),
14
15 /// Error inherited from regex::Error
16 #[error(transparent)]
17 RegexError(#[from] regex::Error),
18
19 /// String descripton of error returned by jsonschema::ValidationError
20 #[error("Failed to compile JSON schema")]
21 JSONSchemaCompilation(String),
22}