Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add suppress_backtrace method #113

Merged
merged 4 commits into from Aug 4, 2022

Conversation

chris-laplante
Copy link
Contributor

@chris-laplante chris-laplante commented Jul 15, 2022

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.

@yaahc yaahc merged commit 4a7b4d6 into eyre-rs:master Aug 4, 2022
@chris-laplante
Copy link
Contributor Author

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants