pub fn panic_c_message(payload: Box<dyn Any + Send>) -> CStringExpand description
Turns a caught panic into the C string a callback macro reports.
That is the panic message, with any interior NUL replaced by ?, or
EMPTY_PANIC_PLACEHOLDER if the message is empty. The payload is
disposed of as take_panic_message does.
ยงExample
let payload = std::panic::catch_unwind(|| panic!("")).unwrap_err();
assert_eq!(
quack_rs::callback::panic_c_message(payload).to_str().unwrap(),
quack_rs::callback::EMPTY_PANIC_PLACEHOLDER,
);