use std::path::PathBuf;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("There must be at least one context settings")]
ContextSettingsMissing,
#[error("I/O error at path {path} while {context}:\n{source}")]
IoPath {
path: PathBuf,
context: &'static str,
source: std::io::Error,
},
#[error(transparent)]
OpenpgpTechnology(#[from] crate::config::technology::openpgp::Error),
#[error("YAML deserialization error while {context}:\n{source}")]
YamlDeserialize {
context: String,
source: Box<serde_saphyr::Error>,
},
#[error("YAML serialization error while {context}:\n{source}")]
YamlSerialize {
context: &'static str,
source: serde_saphyr::ser_error::Error,
},
#[error("Validation error while {context}: {source}")]
Validation {
context: String,
source: garde::Report,
},
#[error(transparent)]
VoaCore(#[from] voa_core::Error),
}