pub fn catch_unwind<F>(f: F) -> Result<Value, CaughtException> where
    F: FnOnce() -> Value
Expand description

Wrapper over rb_protect, catches any Ruby exception within the given function.

If you’re calling into Ruby through this helper module only then you don’t need this because all safe APIs run this for you. However if you’re invoking raw Ruby APIs that can unwind directly, you probably do need this.