Skip to main content

catch

Function catch 

Source
pub fn catch(f: impl FnOnce() -> i64) -> Result<i64, i64>
Expand description

A native host’s call into the program: Ok with the result, or Err with the thrown value, after recover. A misuse panics on. It needs panic = "unwind": with abort, every trap ends the process, and a WASM host catches the trap itself.