Skip to main content

disyn_core/
error.rs

1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum Error {
5    #[error("inference failed: {0}")]
6    Inference(String),
7
8    #[error("verification failed: {violations} violations")]
9    Verification { violations: usize },
10
11    #[error("repair exhausted after {attempts} attempts")]
12    RepairExhausted { attempts: u32 },
13
14    #[error("budget exceeded: {0}")]
15    BudgetExceeded(String),
16
17    #[error("memory store: {0}")]
18    Memory(String),
19
20    #[error("execution failed: {0}")]
21    Execution(String),
22
23    #[error("{0}")]
24    Other(String),
25}
26
27pub type Result<T> = std::result::Result<T, Error>;