Open
Description
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
- ACP: Integrate
Error
trait with panic interfaces libs-team#124 - Implementation: Error in panic #103169
- Final comment period (FCP)1
- Stabilization PR
Unresolved Questions
- How should this actually be invoked? What should be the final interface?
- How do we integrate this with
expect
andunwrap
? (More detail in the ACP)