pub fn catch_panic<F: FnOnce() -> i32 + UnwindSafe>(f: F) -> Result<i32>