1use thiserror::Error;
4
5pub type Result<T> = std::result::Result<T, Error>;
7
8#[derive(Error, Debug, Clone, PartialEq)]
10pub enum Error {
11 #[error("Parse error: {0}")]
12 ParseError(String),
13
14 #[error("Type error: {0}")]
15 TypeError(String),
16
17 #[error("Evaluation error: {0}")]
18 EvaluationError(String),
19
20 #[error("Function not found: {0}")]
21 FunctionNotFound(String),
22
23 #[error("Variable not found: {0}")]
24 VariableNotFound(String),
25
26 #[error("Invalid operation: {0}")]
27 InvalidOperation(String),
28
29 #[error("Unsupported feature: {0}")]
30 Unsupported(String),
31}