feature request: `#[backtrace]` attr add force option
Open
- Dominant language
- Rust
- Stars
- 5.5k
- Forks
- 213
- PR merge metrics
- No merged PRs in 30d
Description
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 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()`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.