1#![allow(clippy::module_name_repetitions, clippy::enum_variant_names)]
2use thiserror::Error as ThisError;
3
4use crate::setup::SetupError;
5
6pub type Result<T> = std::result::Result<T, Error>;
8
9#[derive(ThisError, Debug)]
11pub enum Error {
12 #[error("error reading config")]
14 ReadConfigError {
15 filename: String,
16 source: std::io::Error,
17 },
18
19 #[error("error during app setup")]
21 SetupError(#[source] SetupError),
22
23 #[error("error serializing config")]
28 SerializeConfigError(#[source] toml::ser::Error),
29
30 #[error("error deserializing config")]
32 DeserializeConfigError(#[source] toml::de::Error),
33}