Function wasmer_vm::catch_traps

source ·
pub unsafe fn catch_traps<F>(closure: F) -> Result<(), Trap>where
    F: FnMut(),
Expand description

Catches any wasm traps that happen within the execution of closure, returning them as a Result.

Safety

Soundness must not depend on closure destructors being run.