Skip to main content

spice_framework/
error.rs

1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum SpiceError {
5    #[error("Agent error: {0}")]
6    AgentError(String),
7
8    #[error("Timeout after {0:?}")]
9    Timeout(std::time::Duration),
10
11    #[error("Assertion failed: {0}")]
12    AssertionFailed(String),
13
14    #[error("Configuration error: {0}")]
15    ConfigError(String),
16
17    #[error("IO error: {0}")]
18    Io(#[from] std::io::Error),
19
20    #[error("JSON error: {0}")]
21    Json(#[from] serde_json::Error),
22}