You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//! Other(#[from] anyhow::Error), // source and Display delegate to anyhow::Error
It used to be possible to work around this issue in failure (even on stable, which we are on).
It would seem fine if the backtrace could only be propagated if coming from anyhow.
Is it possible to achieve something like this with the anyhow/thiserror combination?
The text was updated successfully, but these errors were encountered:
I found one solution for this problem - add the #[backtrace] attribute to inner anyhow::Error, but it requires a nightly.
By the way, map() is lazy and your test never will pass as there indeed would be two different backtraces generated during next() call. I fixed it by switching to Vec.
Migrating from
failure
toanyhow
, I encounter an issue where I start losing backtraces whenanyhow::Error
s are wrapped in another error type:It is a kind of usage suggested by the documentation:
thiserror/src/lib.rs
Lines 194 to 195 in 799b3d3
It used to be possible to work around this issue in
failure
(even on stable, which we are on).It would seem fine if the backtrace could only be propagated if coming from
anyhow
.Is it possible to achieve something like this with the
anyhow
/thiserror
combination?The text was updated successfully, but these errors were encountered: