🔊 log to stderr if the config TOML has an error

main
_ 2022-04-04 14:59:17 -05:00
parent 800dbcb019
commit 39bb4d0137
1 changed files with 8 additions and 1 deletions

View File

@ -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::<ConfigFile, _> ("./config/ptth_server.toml").ok ();
let config_file_opt = match ptth_server::load_toml::load::<ConfigFile, _> ("./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);
{