Mercurial > templog
diff rust/src/config.rs @ 636:43eb3cfdf769 rust
some progress, better error handling
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 16 Oct 2019 22:33:06 +0800 |
parents | 4424a8b30f9c |
children | 89818a14648b |
line wrap: on
line diff
--- a/rust/src/config.rs Sun Sep 22 22:06:46 2019 +0800 +++ b/rust/src/config.rs Wed Oct 16 22:33:06 2019 +0800 @@ -43,7 +43,6 @@ }) })?; c.merge(config::Environment::with_prefix("TEMPLOG")).unwrap(); - println!("c is {:?}", c); - Ok(c.try_into().unwrap()) + c.try_into().or_else(|e| Err(TemplogError::new(&format!("Problem loading config {}: {}", conf_file, e)))) } }