rust-cli / confy

🛋 Zero-boilerplate configuration management in Rust
Other
907 stars 61 forks source link

Add a custom `Error` type for confy. #12

Closed yuvallanger closed 5 years ago

yuvallanger commented 5 years ago

I talk about it on #11. I don't know if it works. It compiles.

yuvallanger commented 5 years ago

irc.mozilla.org's #rust-beginners said I shouldn't be returning a std::boxed::Box<std::error::Error>, instead just return a ConfyError, either with or without the help of the failure crate.

yuvallanger commented 5 years ago

I think I will just replace all the rest of the unwrap()s with more ConfyError values. Please make sure the errors reported with those enum values are actually what those errors are.

yuvallanger commented 5 years ago

I am not sure if I am doing it right, so please be careful in your review.

Dylan-DPC-zz commented 5 years ago

Merging this. Thanks

KeyboardDanni commented 5 years ago

Could we see this fix in a new crates.io release, please? I just hit an issue where a supposedly non-fatal parsing of the config file is causing the application to panic.