pub(crate) fn catch_panic<T>(f: impl FnOnce() -> T) -> Result<T, String>
Run f inside catch_unwind, returning either the result or the downcasted panic message.
f
catch_unwind