diff --git a/src/config.rs b/src/config.rs index 17c941d2..02452447 100644 --- a/src/config.rs +++ b/src/config.rs @@ -62,6 +62,7 @@ use toml_query::insert::TomlValueInsertExt; use toml_query::read::TomlValueReadExt; use crate::errors::*; +use crate::utils; /// The overall configuration object for MDBook, essentially an in-memory /// representation of `book.toml`. @@ -168,7 +169,13 @@ impl Config { /// HTML renderer is refactored to be less coupled to `mdbook` internals. #[doc(hidden)] pub fn html_config(&self) -> Option { - self.get_deserialized("output.html").ok() + match self.get_deserialized("output.html") { + Ok(config) => Some(config), + Err(e) => { + utils::log_backtrace(&e.chain_err(|| "Parsing configuration [output.html]")); + None + } + } } /// Convenience function to fetch a value from the config and deserialize it