automapper_validation/
error.rs1#[derive(Debug, Clone, thiserror::Error)]
5pub enum ParseError {
6 #[error("unexpected token at position {position}: expected {expected}, found '{found}'")]
8 UnexpectedToken {
9 position: usize,
10 expected: String,
11 found: String,
12 },
13
14 #[error("unmatched closing parenthesis at position {position}")]
16 UnmatchedCloseParen { position: usize },
17
18 #[error("empty expression after stripping status prefix")]
20 EmptyExpression,
21
22 #[error("invalid condition reference: '{content}'")]
24 InvalidConditionRef { content: String },
25}
26
27#[derive(Debug, thiserror::Error)]
29pub enum ValidationError {
30 #[error("condition expression parse error: {0}")]
32 ConditionParse(#[from] ParseError),
33
34 #[error("unknown Pruefidentifikator: '{0}'")]
36 UnknownPruefidentifikator(String),
37
38 #[error("no condition evaluator registered for {message_type}/{format_version}")]
40 NoEvaluator {
41 message_type: String,
42 format_version: String,
43 },
44}