1use thiserror::Error;
4
5#[derive(Debug, Error)]
6#[non_exhaustive]
7pub enum ConfigError {
8 #[error("config path `{0}` not found")]
9 NotFound(String),
10
11 #[error("config path `{path}` has wrong type (expected {expected})")]
12 WrongType { path: String, expected: &'static str },
13
14 #[error("toml parse error: {0}")]
15 Toml(#[from] toml::de::Error),
16
17 #[error("json parse error: {0}")]
18 Json(#[from] serde_json::Error),
19
20 #[error("hocon parse error: {0}")]
21 Hocon(#[from] crate::hocon::HoconError),
22
23 #[error("invalid key `{0}`")]
24 InvalidKey(String),
25}