Skip to main content

scc_engine/
error.rs

1//! Engine error: the single error type every transport renders.
2
3#[derive(Debug, thiserror::Error)]
4// trace:exempt reason=internal-detail
5pub enum EngineError {
6    #[error("store: {0}")]
7    Store(#[from] scc_store::StoreError),
8    #[error("index: {0}")]
9    Index(#[from] scc_indexer::IndexError),
10    #[error("graph: {0}")]
11    Graph(#[from] scc_graph::GraphError),
12    #[error("io: {0}")]
13    Io(#[from] std::io::Error),
14    #[error("config: {0}")]
15    Config(#[from] scc_indexer::config::ConfigError),
16    #[error("json: {0}")]
17    Json(#[from] serde_json::Error),
18    #[error("{0}")]
19    Other(String),
20}
21
22// trace:exempt reason=internal-detail
23pub type Result<T> = std::result::Result<T, EngineError>;