diff --git a/src/main.rs b/src/main.rs index 9f58f2c..589d373 100644 --- a/src/main.rs +++ b/src/main.rs @@ -381,7 +381,10 @@ async fn load_config_file(config: Config) -> Result { Some(path) => { debug!(?path, "loading config file"); let toml = tokio::fs::read_to_string(&path).await?; - let config: Config = toml::from_str(&toml)?; + let config: Config = match toml::from_str(&toml) { + Ok(c) => c, + Err(e) => panic!("\nfatal error: parsing config file at {} failed:\n\n{}\n\n", path.display(), e), + }; Ok(config) }