Implementation of various bits and pieces of the
panic! macro and
associated runtime pieces.
Specifically, this module contains the implementation of:
- Panic hooks
- Executing a panic up to doing the actual implementation
- Shims around “try”
- PanicPayload 🔒 Experimental
- Hook 🔒
- HOOK 🔒
- This function is called by the panic runtime if FFI code catches a Rust panic but doesn’t rethrow it. We don’t support this case since it messes with our panic count.
- This function is called by the panic runtime if it catches an exception object which does not correspond to a Rust panic.
payloadis passed through another layer of raw pointers as
&mut dyn Traitis not FFI-safe.
BoxMeUplazily performs allocation only when needed (this avoids allocations when using the “abort” panic runtime).
- begin_panicExperimentalThis is the entry point of panicking for the non-format-string variants of panic!() and assert!(). In particular, this is the only entry point that supports arbitrary payloads, not just format strings.
- Entry point of panics from the core crate (
- cleanup 🔒 ⚠
- do_call 🔒
- do_catch 🔒
- Determines whether the current thread is unwinding because of panic.
- An unmangled function (through
rustc_std_internal_symbol) on which to slap yer breakpoints.
- Central point for dispatching panics.
- This is the entry point for
resume_unwind. It just forwards the payload to the panic runtime.
- try⚠Invoke a closure, capturing the cause of an unwinding panic if one occurs.
- Registers a custom panic hook, replacing the previously registered hook.
- Unregisters the current panic hook and returns it, registering the default hook in its place.
- Data 🔒