pub fn caught<R>(f: impl FnOnce() -> R + UnwindSafe) -> Result<R>Expand description
Run f, catching a panic it raises; while it runs, is_caught answers true on this thread.
pub fn caught<R>(f: impl FnOnce() -> R + UnwindSafe) -> Result<R>Run f, catching a panic it raises; while it runs, is_caught answers true on this thread.