Skip to main content

crue_engine/
error.rs

1//! CRUE Engine Error Module
2
3use thiserror::Error;
4
5#[derive(Error, Debug)]
6pub enum EngineError {
7    #[error("Rule not found: {0}")]
8    RuleNotFound(String),
9
10    #[error("Field not found: {0}")]
11    FieldNotFound(String),
12
13    #[error("Invalid operator: {0}")]
14    InvalidOperator(String),
15
16    #[error("Invalid action: {0}")]
17    InvalidAction(String),
18
19    #[error("Type mismatch for field: {0}")]
20    TypeMismatch(String),
21
22    #[error("Evaluation error: {0}")]
23    EvaluationError(String),
24
25    #[error("Rule compilation error: {0}")]
26    CompilationError(String),
27
28    #[error("Rule signature invalid: {0}")]
29    InvalidSignature(String),
30}