wasmtime_context_set_exception function

  1. @Native<Pointer<wasm_trap_t> Function(Pointer<wasmtime_context_t> store, Pointer<wasmtime_exnref_t> exn)>(ffi.Pointer<wasmtime_context_t>, ffi.Pointer<wasmtime_exnref_t>)>()
Pointer<wasm_trap_t> wasmtime_context_set_exception(
  1. Pointer<wasmtime_context_t> store,
  2. Pointer<wasmtime_exnref_t> exn
)

\brief Sets the pending exception on the store and returns a trap.

Returns a wasm_trap_t that the host callback MUST return to signal to the Wasm runtime that an exception was thrown. The caller owns the returned trap.

\param store the store context \param exn the exception to throw \return a trap to return from the host callback (caller-owned)

Implementation

@ffi.Native<
  ffi.Pointer<wasm_trap_t> Function(
    ffi.Pointer<wasmtime_context_t>,
    ffi.Pointer<wasmtime_exnref_t>,
  )
>()
external ffi.Pointer<wasm_trap_t> wasmtime_context_set_exception(
  ffi.Pointer<wasmtime_context_t> store,
  ffi.Pointer<wasmtime_exnref_t> exn,
);