Skip to content

fix: don't capture backtraces by default#710

Merged
XAMPPRocky merged 1 commit into
XAMPPRocky:mainfrom
benpueschel:disable-backtraces
Oct 6, 2024
Merged

fix: don't capture backtraces by default#710
XAMPPRocky merged 1 commit into
XAMPPRocky:mainfrom
benpueschel:disable-backtraces

Conversation

@benpueschel
Copy link
Copy Markdown
Contributor

Call Backtrace::capture() instead of the Backtrace::generate() method provided by snafu. This disables backtrace capturing unless either the RUST_BACKTRACE or RUST_LIB_BACKTRACE environment variables are set at runtime.

This completely disables backtrace capturing, not just displaying the backtrace though, so if the backtrace is too important to disable it completely by default, I could also refactor this PR to change the display behavior - maybe through a feature flag letting consumers decide if they want to work with backtraces or not.

Closes: #649

Call `Backtrace::capture()` instead of the `Backtrace::generate()`
method provided by snafu. This disables backtrace capturing unless
either the `RUST_BACKTRACE` or `RUST_LIB_BACKTRACE` environment
variables are set at runtime.

Refs: XAMPPRocky#649
@XAMPPRocky
Copy link
Copy Markdown
Owner

Thank you for your PR!

@XAMPPRocky XAMPPRocky merged commit 42af5be into XAMPPRocky:main Oct 6, 2024
@github-actions github-actions Bot mentioned this pull request Oct 6, 2024
dmgorsky pushed a commit to dmgorsky/octocrab that referenced this pull request Oct 8, 2024
@github-actions github-actions Bot mentioned this pull request Oct 9, 2024
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.

Easily remove backtraces from error messages

2 participants