1use thiserror::Error;
4
5#[derive(Debug, Error)]
7pub enum QuantEvalError {
8 #[error("IO error: {0}")]
9 Io(#[from] std::io::Error),
10
11 #[error("Serialization error: {0}")]
12 Serialization(String),
13
14 #[error("Benchmark execution failed: {0}")]
15 Execution(String),
16
17 #[error("Git operation failed: {0}")]
18 Git(String),
19
20 #[error("No git repository found")]
21 NoGitRepo,
22
23 #[error("Invalid corpus configuration: {0}")]
24 InvalidCorpus(String),
25
26 #[error("Codec error: {0}")]
27 Codec(String),
28
29 #[error("Profile not found: {0}")]
30 ProfileNotFound(String),
31}
32
33impl From<String> for QuantEvalError {
34 fn from(s: String) -> Self {
35 QuantEvalError::Execution(s)
36 }
37}