use std::num::ParseIntError;
use std::str::ParseBoolError;
use thiserror::Error;
pub type Result<T, E = ConfigError> = std::result::Result<T, E>;
#[derive(Error, Debug)]
pub enum ConfigError {
#[error("Failed to parse '{1}' for config '{0}': {2}")]
ParseBool(String, String, ParseBoolError),
#[error("Failed to parse '{1}' for config '{0}': {2}")]
ParseInt(String, String, ParseIntError),
#[error("Failed to parse line: {0}'")]
ParseLine(String),
#[error("Config value '{0}' is not valid")]
InvalidValue(String),
#[error("Config '{0}' not found")]
NotFound(String),
#[error("Config value '{0}' is not supported")]
UnsupportedValue(String),
}