Skip to main content

panic_payload_text

Function panic_payload_text 

Source
pub fn panic_payload_text(payload: &(dyn Any + Send)) -> String
Expand description

Best-effort text for a caught panic payload.

Any only carries the payload types panic! produces: &'static str for a literal message, String for a formatted one. Any other payload (a panic_any caller reaching in with something else) reports as unknown rather than failing to build a message.

Public so a host writing its own containment reports a panic the same way this backstop does.