use std::io;
use thiserror::Error;
#[derive(Error, Debug)]
pub enum ConfigError {
#[error("Error reading config file from path {path}: {error}")]
ReadFromPath {
path: String,
#[source]
error: io::Error,
},
#[error("Error parsing TOML config from path {path}: {error}")]
TomlParseFromPath {
path: String,
#[source]
error: toml::de::Error,
},
#[error("Error parsing TOML config from string: {error}\nContent:\n{content}")]
TomlParseFromString {
content: String,
#[source]
error: toml::de::Error,
},
#[error("Configuration error: {msg}")]
Generic { msg: String },
}