Skip to main content

on_panic

Function on_panic 

Source
pub fn on_panic(info: &PanicInfo<'_>) -> !
Expand description

Shared message-only panic handler for both targets. Pushes the panic info into the ring (alongside the pre-panic context that’s already there), then synchronously drains the ring via the raw FIFO poker — the async drain task is gone (or never started) so it can’t service the ring for us. After the drain, halts so the fault stays visible. No stack walk: message-only on both targets (deliberate, symmetric), which is why neither esp-backtrace nor esp-println is pulled in. The binary’s #[panic_handler] is a one-line wrapper around this.