Skip to main content

catch_panic

Function catch_panic 

Source
pub(crate) fn catch_panic<T>(f: impl FnOnce() -> T) -> Result<T, String>
Expand description

Run f inside catch_unwind, returning either the result or the downcasted panic message.