MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / handle_call_error

Function handle_call_error

crates/c-api/src/async.rs:211–221  ·  view source on GitHub ↗
(
    err: wasmtime::Error,
    trap_ret: &mut *mut wasm_trap_t,
    err_ret: &mut *mut wasmtime_error_t,
)

Source from the content-addressed store, hash-verified

209}
210
211fn handle_call_error(
212 err: wasmtime::Error,
213 trap_ret: &mut *mut wasm_trap_t,
214 err_ret: &mut *mut wasmtime_error_t,
215) {
216 if err.is::<Trap>() {
217 *trap_ret = Box::into_raw(Box::new(wasm_trap_t::new(err)));
218 } else {
219 *err_ret = Box::into_raw(Box::new(wasmtime_error_t::from(err)));
220 }
221}
222
223async fn do_func_call_async(
224 #[cfg(feature = "gc")] mut store: wasmtime::RootScope<WasmtimeStoreContextMut<'_>>,

Callers 3

do_func_call_asyncFunction · 0.85

Calls 2

fromFunction · 0.85
newFunction · 0.50

Tested by

no test coverage detected