Skip to main content

panic_message

Function panic_message 

Source
pub fn panic_message(err: &(dyn Any + Send)) -> &str
Expand description

The human-readable message a panic payload carries, or a fixed fallback.

std::panic::panic_any can carry any 'static type; the two shapes that actually occur are panic!("literal") (&'static str) and panic!("{x}") (String). Anything else is reported as the fallback — the message only reaches the log, never a response body (ASVS V16.5.1).