Skip to content

Tracking Issue for integrating Error trait with panic interfaces #103820

Open
@DebugSteven

Description

@DebugSteven

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions