|
|
|
|
|
by lewantmontreal
1038 days ago
|
|
I’ve always wondered why the backtrace just kind of stops midway to when you finally handle an error, instead of showing up to the `?` where the error happened. I’ve been using anyhow’s `with_context` to add helpful notes to each usage of `?` to get around it. I’ll have to check if this macro is an easier solution! |
|
`anyhow`'s `with_context` is great, but seems to require you to modify each line of code where errors are created, to find the error.
With `wherr`, you only need to add one line of code, `#[wherr]`, per function.