use std::path::PathBuf;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("{path}: {source}")]
Io {
path: PathBuf,
source: std::io::Error,
},
#[error("{path}: YAML: {source}")]
Yaml {
path: PathBuf,
source: serde_norway::Error,
},
#[error("project type {name:?}: {reason}")]
Config {
name: String,
reason: String,
},
#[error("project type {name:?}: indicator[{index}] CEL compile: {reason}")]
Cel {
name: String,
index: usize,
reason: String,
},
#[error(
"project type {name:?} uses a CEL indicator but the `cel` feature is not enabled — \
build with `--features cel`"
)]
CelFeatureDisabled {
name: String,
},
}
pub type Result<T> = std::result::Result<T, Error>;