Closed marmistrz closed 5 years ago
Rust implicitness FTW
Why does one want to wrap an error into a context?
See how context is used throughout gumpi. For instance here: https://github.com/golemfactory/gumpi/blob/ecd4c53684fd2e3ba67c011fcaabefee5b8d2756/src/jobconfig.rs#L41 And how the final error message is constructed: https://github.com/golemfactory/gumpi/blob/ecd4c53684fd2e3ba67c011fcaabefee5b8d2756/src/main.rs#L26
Usually the errors are really sparse in Rust, so we need to use context to add more and more context to the error, so that it's anyhow useful to the user.
Related to #46. The
failure_ext
crate is available here: https://github.com/marmistrz/failure_extI created my own crate because this PR hasn't been merged since Nov 2018.