From 89d4fdbcc3ce3a99083cb049301bd715d83bedd7 Mon Sep 17 00:00:00 2001 From: Trisha Lefler Date: Tue, 25 Oct 2022 10:28:45 -0500 Subject: [PATCH] :loud_sound: add error message for config file --- crates/ptth_server_gui/src/main.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/ptth_server_gui/src/main.rs b/crates/ptth_server_gui/src/main.rs index c5de016..90748ac 100644 --- a/crates/ptth_server_gui/src/main.rs +++ b/crates/ptth_server_gui/src/main.rs @@ -47,7 +47,13 @@ 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/ptth_server.toml`: {:?}", e); + None + }, + }; let (hit_tx, mut hit_rx) = mpsc::channel (1); {