rh_foundation/snapshot/
error.rs1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum SnapshotError {
5 #[error("Base structure definition not found: {0}")]
6 BaseNotFound(String),
7
8 #[error("Invalid structure definition: {0}")]
9 InvalidStructureDefinition(String),
10
11 #[error("Differential merge error: {0}")]
12 MergeError(String),
13
14 #[error("Element path error: {0}")]
15 PathError(String),
16
17 #[error("Circular dependency detected: {0}")]
18 CircularDependency(String),
19
20 #[error("Serialization error: {0}")]
21 SerializationError(#[from] serde_json::Error),
22
23 #[error("Other error: {0}")]
24 Other(String),
25}
26
27pub type SnapshotResult<T> = Result<T, SnapshotError>;