In my application, there are certain errors that are mundane enough that I don't really need a backtrace. But I still want to be able to propagate the error using all the nice eyre machinery I've set up. This PR adds a suppress_backtrace method which lets you do just that.
To expand a bit: in my application's main I set RUST_BACKTRACE to 1:
// Automatically enable backtracing unless user explicitly disabled it
if env::var("RUST_BACKTRACE").is_err() {
env::set_var("RUST_BACKTRACE", "1");
}
This is so that when people report problems with my application, it will always spit out a useful backtrace that they can provide.
In my application, there are certain errors that are mundane enough that I don't really need a backtrace. But I still want to be able to propagate the error using all the nice eyre machinery I've set up. This PR adds a
suppress_backtrace
method which lets you do just that.To expand a bit: in my application's
main
I setRUST_BACKTRACE
to1
:This is so that when people report problems with my application, it will always spit out a useful backtrace that they can provide.