Skip to main content

ucm_engine/
error.rs

1//! Error types for the UCM engine.
2
3use thiserror::Error;
4
5/// Engine error type
6#[derive(Debug, Error)]
7pub enum Error {
8    #[error("Block not found: {0}")]
9    BlockNotFound(String),
10
11    #[error("Invalid operation: {0}")]
12    InvalidOperation(String),
13
14    #[error("Section error: {0}")]
15    SectionError(String),
16
17    #[error("Parse error: {0}")]
18    ParseError(String),
19
20    #[error("Validation error: {0}")]
21    ValidationError(String),
22
23    #[error("Transaction error: {0}")]
24    TransactionError(String),
25
26    #[error("Snapshot error: {0}")]
27    SnapshotError(String),
28
29    #[error("Core error: {0}")]
30    Core(#[from] ucm_core::Error),
31}
32
33/// Result type alias for engine operations
34pub type Result<T> = std::result::Result<T, Error>;