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

std: Add a backtrace module #64154

Merged
merged 1 commit into from
Sep 11, 2019
Merged

Commits on Sep 9, 2019

  1. std: Add a backtrace module

    This commit adds a `backtrace` module to the standard library, as
    designed in [RFC 2504]. The `Backtrace` type is intentionally very
    conservative, effectively only allowing capturing it and printing it.
    
    Additionally this commit also adds a `backtrace` method to the `Error`
    trait which defaults to returning `None`, as specified in [RFC 2504].
    More information about the design here can be found in [RFC 2504] and in
    the [tracking issue].
    
    Implementation-wise this is all based on the `backtrace` crate and very
    closely mirrors the `backtrace::Backtrace` type on crates.io. Otherwise
    it's pretty standard in how it handles everything internally.
    
    [RFC 2504]: https://github.com/rust-lang/rfcs/blob/master/text/2504-fix-error.md
    [tracking issue]: rust-lang#53487
    
    cc rust-lang#53487
    alexcrichton committed Sep 9, 2019
    Configuration menu
    Copy the full SHA
    34662c6 View commit details
    Browse the repository at this point in the history