Function wasmtime_runtime::catch_traps
source · pub unsafe fn catch_traps<'a, F>(
signal_handler: Option<*const SignalHandler<'static>>,
capture_backtrace: bool,
caller: *mut VMContext,
closure: F,
) -> Result<(), Box<Trap>>
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.