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

feature request: #[backtrace] attr add force option #321

Open
Sherlock-Holo opened this issue Sep 20, 2024 · 0 comments
Open

feature request: #[backtrace] attr add force option #321

Sherlock-Holo opened this issue Sep 20, 2024 · 0 comments

Comments

@Sherlock-Holo
Copy link

currently the #[backtrace] attr has no option, and thiserror generated codes always use Backtrace::capture()

however, if user want some error always enable backtrace, they have to

  • write impl From<Err> Error manually
  • or set env RUST_BACKTRACE=1, but that will cause all backtraces are enabled, even they only want to enable a few error backtrace

if #[backtrace] add a new option force, like #[backtrace(force=true)], when user enable the force capture, thiserror generated codes can use Backtrace::force_capture() instead of Backtrace::capture()

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

No branches or pull requests

1 participant