Function wasmtime_runtime::catch_traps [−][src]
pub unsafe fn catch_traps<'a, F>(
vminterrupts: *mut VMInterrupts,
signal_handler: Option<*const SignalHandler<'static>>,
callee: *mut VMContext,
closure: F
) -> Result<(), Box<Trap>> where
F: FnMut(*mut VMContext), 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.