Function wasmtime_runtime::catch_traps
source · [−]pub unsafe fn catch_traps<F>(
vmctx: *mut VMContext,
trap_info: &impl TrapInfo,
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
.
Highly unsafe since closure
won’t have any dtors run.