ffi_utils
pub fn catch_unwind_result<'a, F, T, E>(f: F) -> Result<T, E> where F: FnOnce() -> Result<T, E>, E: Debug + From<&'a str>,
Catches panics and returns the result.