34#ifdef WASMTIME_FEATURE_GC
Build-time defines for how the C API was built.
Definition and accessors of wasmtime_error_t.
struct wasmtime_exn wasmtime_exn_t
An opaque type representing a WebAssembly exception object.
Definition: exn.h:54
WASM_API_EXTERN size_t wasmtime_exn_field_count(wasmtime_context_t *store, const wasmtime_exn_t *exn)
Returns the number of fields in this exception.
WASM_API_EXTERN wasmtime_error_t * wasmtime_exn_tag(wasmtime_context_t *store, const wasmtime_exn_t *exn, wasmtime_tag_t *tag_ret)
Returns the tag associated with this exception.
WASM_API_EXTERN wasmtime_error_t * wasmtime_exn_field(wasmtime_context_t *store, const wasmtime_exn_t *exn, size_t index, wasmtime_val_t *val_ret)
Reads a field value from this exception by index.
WASM_API_EXTERN void wasmtime_exn_delete(wasmtime_exn_t *exn)
Deletes a wasmtime_exn_t.
WASM_API_EXTERN wasmtime_error_t * wasmtime_exn_new(wasmtime_context_t *store, const wasmtime_tag_t *tag, const wasmtime_val_t *fields, size_t nfields, wasmtime_exn_t **exn_ret)
Creates a new exception object.
WASM_API_EXTERN bool wasmtime_context_has_exception(wasmtime_context_t *store)
Tests whether there is a pending exception on the store.
WASM_API_EXTERN bool wasmtime_context_take_exception(wasmtime_context_t *store, wasmtime_exn_t **exn_ret)
Takes the pending exception from the store, if any.
WASM_API_EXTERN wasm_trap_t * wasmtime_context_set_exception(wasmtime_context_t *store, wasmtime_exn_t *exn)
Sets the pending exception on the store and returns a trap.
Opaque struct representing a wasm trap.
An interior pointer into a wasmtime_store_t which is used as "context" for many functions.
Errors generated by Wasmtime.
Representation of a tag in Wasmtime.
Definition: tag.h:28
Container for different kinds of wasm values.
Definition: val.h:541
Wasmtime APIs for interacting with WebAssembly tags.