Skip to main content

maybe_panic_at

Function maybe_panic_at 

Source
pub fn maybe_panic_at(name: &str)
Expand description

Crash the current process if name is listed in HEDDLE_FAULT_INJECT.

Production callers thread this at points where a crash would exercise a recovery path. Tests set the env var on a child process to deterministically trigger the crash, then verify the next clean process recovers.

The panic message includes the checkpoint name so test logs can distinguish an intentional fault from a real bug.