pub unsafe fn catch_traps<'a, F>(
    signal_handler: Option<*const SignalHandler<'static>>,
    capture_backtrace: bool,
    caller: *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.