forge
Explore
Log in

Don't you dare go Hollow

Move miette set earlier

Browse files at this commit

8bcd18ace2767a0fa034d76d58ffdb5657ce9bf5Ivan MolodetskikhParent: 4fefab7
src/main.rsmodified+3 -1
@@ -92,6 +92,9 @@ fn main() {
9292
9393 let _client = tracy_client::Client::start();
9494
95+ // Set a better error printer for config loading.
96+ miette::set_hook(Box::new(|_| Box::new(NarratableReportHandler::new()))).unwrap();
97+
9598 info!(
9699 "starting version {} ({})",
97100 env!("CARGO_PKG_VERSION"),
@@ -99,7 +102,6 @@ fn main() {
99102 );
100103
101104 // Load the config.
102- miette::set_hook(Box::new(|_| Box::new(NarratableReportHandler::new()))).unwrap();
103105 let (mut config, path) = match Config::load(cli.config).context("error loading config") {
104106 Ok((config, path)) => (config, Some(path)),
105107 Err(err) => {