target / lorri

Your project's nix-env
Apache License 2.0
992 stars 69 forks source link

Wrap io actions that might throw a FileNotFound error into an error type containing the file name #475

Open Profpatsch opened 4 years ago

Profpatsch commented 4 years ago

Currently, we use the ? operator a lot to propagate std::io::Errors and then wrap them and throw them outward.

The problem with FileNotFound errors is that these don’t contain the path of the file that is missing, so the resulting error trace is mostly useless.

We can either manually wrap these, or use an error crate like eyre.

seylerius commented 3 years ago

This would be really helpful, because I'm currently running into a crash caused by this.