Add Apply Error

This commit is contained in:
Samuel Lorch 2024-01-14 23:15:21 +01:00
parent ecd71fc6a7
commit 163c097d2d
2 changed files with 12 additions and 0 deletions

9
src/apply/mod.rs Normal file
View file

@ -0,0 +1,9 @@
use thiserror::Error;
pub mod networkd;
#[derive(Error, Debug)]
pub enum ApplyError {
#[error("Template Error")]
TemplateError(#[from] tera::Error),
}

View file

@ -23,6 +23,9 @@ pub enum ConfigError {
#[error("Unsupported config version")]
UnsupportedVersionError,
#[error("Apply Error")]
ApplyError(#[from] super::apply::ApplyError),
/// Represents all other cases of `std::io::Error`.
#[error(transparent)]
IOError(#[from] std::io::Error),