Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

panic handler

The function a no_std Rust program must provide to decide what happens when it panics.

A #[panic_handler] function receives the PanicInfo and never returns; in firmware it typically logs a message and backtrace and resets or halts the chip.

Examples

  • An unwrap() on None in ESP32-C6 firmware panics; with esp-backtrace linked in, its handler prints a backtrace and halts.

  • Without std there's no default panic handler, so a no_std program that doesn't supply one won't link.

Read the full section →