1use thiserror::Error;
6
7pub type Result<T> = std::result::Result<T, Error>;
9
10#[derive(Error, Debug)]
12pub enum Error {
13 #[error("grammar error: {0}")]
15 Grammar(String),
16
17 #[error("generation error: {0}")]
19 Generation(String),
20
21 #[error("mutation error: {0}")]
23 Mutation(String),
24
25 #[error("transpile error: {0}")]
27 Transpile(String),
28
29 #[error("verification error: {0}")]
31 Verification(String),
32
33 #[error("execution timeout after {0}ms")]
35 Timeout(u64),
36
37 #[error("runtime error in {phase}: {message}")]
39 Runtime {
40 phase: String,
42 message: String,
44 },
45
46 #[error("io error: {0}")]
48 Io(#[from] std::io::Error),
49
50 #[error("serialization error: {0}")]
52 Serialization(String),
53
54 #[error("configuration error: {0}")]
56 Configuration(String),
57
58 #[error("data error: {0}")]
60 Data(String),
61}