From 39bb4d0137cdf0dc8165237b94d6e5b4690bcc3c Mon Sep 17 00:00:00 2001 From: _ <_@_> Date: Mon, 4 Apr 2022 14:59:17 -0500 Subject: [PATCH] :loud_sound: log to stderr if the config TOML has an error --- crates/ptth_server_gui/src/main.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/crates/ptth_server_gui/src/main.rs b/crates/ptth_server_gui/src/main.rs index a8565ab..52bfacc 100644 --- a/crates/ptth_server_gui/src/main.rs +++ b/crates/ptth_server_gui/src/main.rs @@ -47,7 +47,14 @@ fn main () let app = app::App::default(); let mut wind = Window::new (100, 100, 500, 180, "PTTH server"); - let config_file_opt = ptth_server::load_toml::load:: ("./config/ptth_server.toml").ok (); + let config_file_opt = match ptth_server::load_toml::load:: ("./config/ptth_server.toml") + { + Ok (x) => Some (x), + Err (e) => { + eprintln! ("Error in config TOML: {:?}", e); + None + } + }; let (hit_tx, mut hit_rx) = mpsc::channel (1); {