Skip to content

Tracking Issue for integrating Error trait with panic interfaces #103820

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

Open
6 tasks
DebugSteven opened this issue Oct 31, 2022 · 0 comments
Open
6 tasks

Tracking Issue for integrating Error trait with panic interfaces #103820

DebugSteven opened this issue Oct 31, 2022 · 0 comments
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Comments

@DebugSteven
Copy link
Contributor

DebugSteven commented Oct 31, 2022

Feature gate: #![feature(error_in_panic)]

This is a tracking issue for integrating the Error trait with panic interfaces.

This allows panic handlers to access the richer Error trait interface when reporting panics that have a runtime error as their source.

Public API

/// core::panic

impl PanicInfo<'_> {
    pub fn source(&self) -> Option<&(dyn Error + 'static)>;
}

Steps / History

Unresolved Questions

  • How should this actually be invoked? What should be the final interface?
  • How do we integrate this with expect and unwrap? (More detail in the ACP)

Footnotes

  1. https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html

@DebugSteven DebugSteven added C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. labels Oct 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-tracking-issue Category: An issue tracking the progress of sth. like the implementation of an RFC T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

1 participant