spatialrust_runtime/error.rs
1//! Runtime crate errors.
2
3/// Result type for runtime operations.
4pub type RuntimeResult<T> = Result<T, RuntimeError>;
5
6/// Failures in bounded pipelines and adapters.
7#[derive(Debug, thiserror::Error)]
8pub enum RuntimeError {
9 /// Invalid configuration.
10 #[error("invalid runtime configuration: {0}")]
11 InvalidConfiguration(String),
12 /// Backpressure / capacity exceeded.
13 #[error("pipeline capacity exceeded: {0}")]
14 CapacityExceeded(String),
15 /// Explicit failure with diagnostic code.
16 #[error("runtime failure `{code}`: {message}")]
17 Failure {
18 /// Machine-readable code.
19 code: String,
20 /// Human-readable message.
21 message: String,
22 },
23}