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
I have large codebase which uses anyhow::{Result, Context, bail} a lot,
and the errors don't tell much. No filename/line numbers at all.
Using RUST_BACKTRACE=1 is not convenient.
I found #22 but it will require many changes to add it everywhere.
Is there an elegant way to get short backtrace when error occur, just like we get it with unwrap()?
Example:
use anyhow::{Result, bail};fnmain() -> Result<()>{job()}fnjob() -> Result<()>{bail!("error in job")}
cargo runError: error in job
Imagine large codebase with many errors coming from internal libraries... no idea where it happens.
Thanks
The text was updated successfully, but these errors were encountered:
I have large codebase which uses
anyhow::{Result, Context, bail}
a lot,and the errors don't tell much. No filename/line numbers at all.
Using
RUST_BACKTRACE=1
is not convenient.I found #22 but it will require many changes to add it everywhere.
Is there an elegant way to get short backtrace when error occur, just like we get it with
unwrap()
?Example:
Imagine large codebase with many errors coming from internal libraries... no idea where it happens.
Thanks
The text was updated successfully, but these errors were encountered: