use thiserror::Error;
#[derive(Error, Debug)]
#[non_exhaustive]
pub enum DalfoxError {
#[error("failed to execute dalfox binary: {0}")]
ExecutionFailed(#[from] std::io::Error),
#[error("dalfox process exited with status {status}: {stderr}")]
ProcessFailed {
status: i32,
stderr: String,
},
#[error("failed to parse dalfox JSON output: {0}")]
ParseError(#[from] serde_json::Error),
#[error("dalfox scan exceeded deadline of {deadline_secs} seconds")]
ScanDeadlineExceeded {
deadline_secs: u64,
},
#[error("dalfox binary not found at '{path}': ensure dalfox is installed and in PATH")]
BinaryNotFound {
path: String,
},
}