use thiserror::Error;
#[derive(Debug, Error)]
pub enum BenchError {
#[error("Workload validation failed for field '{field}': {reason}")]
WorkloadValidation {
field: String,
reason: String,
},
#[error("Workload file not found: {path}")]
WorkloadNotFound {
path: String,
},
#[error("External runner '{framework}' failed: {reason}")]
ExternalRunner {
framework: String,
reason: String,
},
#[error("External runner '{framework}' timed out after {timeout_secs}s")]
ExternalTimeout {
framework: String,
timeout_secs: u64,
},
#[error("LLM call failed: {0}")]
Llm(String),
#[error("Baseline operation failed: {0}")]
Baseline(String),
#[error("Serialization error: {0}")]
Serialization(String),
#[error("Memory sampling unavailable on this platform: {0}")]
MemoryUnavailable(String),
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
}
pub type Result<T> = std::result::Result<T, BenchError>;