use std::path::PathBuf;
use thiserror::Error;
#[derive(Debug, Error)]
pub enum LoadError {
#[error("config: read {path}: {source}")]
Io {
path: PathBuf,
#[source]
source: std::io::Error,
},
#[error("config: parse {path}: {source}")]
Yaml {
path: PathBuf,
#[source]
source: serde_yaml_ng::Error,
},
#[error("config: invalid {path} at {key}: {message}")]
Invalid {
path: PathBuf,
key: String,
message: String,
},
#[error("config: unresolved reference at {key}: {message}")]
UnresolvedRef { key: String, message: String },
}