wasmtime_exnref_new function

  1. @Native<Pointer<wasmtime_error_t> Function(Pointer<wasmtime_context_t>, Pointer<wasmtime_tag_t>, Pointer<wasmtime_val_t>, Size, Pointer<wasmtime_exnref_t>)>(ffi.Pointer<wasmtime_context_t>, ffi.Pointer<wasmtime_tag_t>, ffi.Pointer<wasmtime_val_t>, ffi.Size, ffi.Pointer<wasmtime_exnref_t>)>()
Pointer<wasmtime_error_t> wasmtime_exnref_new(
  1. Pointer<wasmtime_context_t> store,
  2. Pointer<wasmtime_tag_t> tag,
  3. Pointer<wasmtime_val_t> fields,
  4. int nfields,
  5. Pointer<wasmtime_exnref_t> exn_ret,
)

\brief Creates a new exception object.

\param store the store context \param tag the tag to associate with this exception \param fields pointer to an array of field values matching the tag's payload signature \param nfields the number of elements in fields \param exn_ret on success, set to the newly allocated exception. The caller owns the returned pointer and must free it with #wasmtime_exnref_unroot.

\return NULL on success, or an error on failure.

Implementation

@ffi.Native<
  ffi.Pointer<wasmtime_error_t> Function(
    ffi.Pointer<wasmtime_context_t>,
    ffi.Pointer<wasmtime_tag_t>,
    ffi.Pointer<wasmtime_val_t>,
    ffi.Size,
    ffi.Pointer<wasmtime_exnref_t>,
  )
>()
external ffi.Pointer<wasmtime_error_t> wasmtime_exnref_new(
  ffi.Pointer<wasmtime_context_t> store,
  ffi.Pointer<wasmtime_tag_t> tag,
  ffi.Pointer<wasmtime_val_t> fields,
  int nfields,
  ffi.Pointer<wasmtime_exnref_t> exn_ret,
);