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

Support a backtrace #11

Closed
shepmaster opened this issue Feb 2, 2019 · 2 comments
Closed

Support a backtrace #11

shepmaster opened this issue Feb 2, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@shepmaster
Copy link
Owner

People like backtraces.

My idea is to support a field called backtrace. If it's present, it will be automatically constructed when From::from or fail is called.

One trick will be to decide how best to have forwards-compatibility. Eventually, the standard library will have such a type and it will accessible via the Error trait, but it's not there today. We'd prefer to be able to be able to seamlessly upgrade.

My thought is to have a newtype for the backtrace crate that doesn't expose much in the way of an API. We can then add an inherent method on the Error enum with the proposed API for std::error::Error.

Things to check / consider:

@shepmaster shepmaster added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Feb 2, 2019
@shepmaster
Copy link
Owner Author

  • What happens when std::error::Error gains the method; will that cause conflicts?

I decided to create a parallel ErrorCompat trait and encourage people to use the methods explicitly.

@shepmaster
Copy link
Owner Author

  • Do we need multiple ways to specify what the backtrace is?

Postponing this.

@shepmaster shepmaster removed good first issue Good for newcomers help wanted Extra attention is needed labels Feb 4, 2019
shepmaster added a commit that referenced this issue Feb 4, 2019
shepmaster added a commit that referenced this issue Feb 4, 2019
shepmaster added a commit that referenced this issue Feb 4, 2019
shepmaster added a commit that referenced this issue Feb 4, 2019
shepmaster added a commit that referenced this issue Feb 4, 2019
shepmaster added a commit that referenced this issue Feb 5, 2019
@shepmaster shepmaster self-assigned this Apr 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant