use std::path::PathBuf;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("template not found: {path}")]
TemplateNotFound {
path: PathBuf,
},
#[error("parse error at {location}: {message}")]
Parse {
location: String,
message: String,
},
#[error("binding '{name}' has no values")]
MissingBinding {
name: String,
},
#[error("compose reference not found: {path}")]
ComposeNotFound {
path: PathBuf,
},
#[error("command source not found: {path}")]
CommandSourceNotFound {
path: PathBuf,
},
#[error("io error: {0}")]
Io(#[from] std::io::Error),
#[error("mock table '{name}' not registered")]
MockNotFound {
name: String,
},
#[error("circular compose reference detected: {path}")]
CircularReference {
path: PathBuf,
},
#[error("missing slot '@{name}' — not provided by caller")]
MissingSlot {
name: String,
},
}
pub type Result<T> = std::result::Result<T, Error>;