Wasmtime
error.h
Go to the documentation of this file.
1
7#ifndef WASMTIME_ERROR_H
8#define WASMTIME_ERROR_H
9
10#include <wasm.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
32
36WASM_API_EXTERN wasmtime_error_t *wasmtime_error_new(const char *);
37
41WASM_API_EXTERN void wasmtime_error_delete(wasmtime_error_t *error);
42
51WASM_API_EXTERN void wasmtime_error_message(const wasmtime_error_t *error,
52 wasm_name_t *message);
53
61WASM_API_EXTERN bool wasmtime_error_exit_status(const wasmtime_error_t *,
62 int *status);
63
71WASM_API_EXTERN void wasmtime_error_wasm_trace(const wasmtime_error_t *,
72 wasm_frame_vec_t *out);
73
74#ifdef __cplusplus
75} // extern "C"
76#endif
77
78#endif // WASMTIME_ERROR_H
void wasmtime_error_message(const wasmtime_error_t *error, wasm_name_t *message)
Returns the string description of this error.
void wasmtime_error_delete(wasmtime_error_t *error)
Deletes an error.
void wasmtime_error_wasm_trace(const wasmtime_error_t *, wasm_frame_vec_t *out)
Attempts to extract a WebAssembly trace from this error.
wasmtime_error_t * wasmtime_error_new(const char *)
Creates a new error with the provided message.
bool wasmtime_error_exit_status(const wasmtime_error_t *, int *status)
Attempts to extract a WASI-specific exit status from this error.
A list of bytes.
Definition: wasm.h:102
A list of wasm_frame_t frameues.
Definition: wasm.h:373
Errors generated by Wasmtime.