Skip to content

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

Description

@Sherlock-Holo

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()

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions