Wasmtime
wasmtime::Error Class Reference

Errors coming from Wasmtime. More...

#include <error.hh>

Public Member Functions

 Error (wasmtime_error_t *error)
 Creates an error from the raw C API representation. More...
 
 Error (const std::string &s)
 Creates an error with the provided message.
 
std::string message () const
 Returns the error message associated with this error.
 
std::optional< int32_t > i32_exit () const
 
Trace trace () const
 
wasmtime_error_trelease ()
 Release ownership of this error, acquiring the underlying C raw pointer.
 

Detailed Description

Errors coming from Wasmtime.

This class represents an error that came from Wasmtime and contains a textual description of the error that occurred.

Constructor & Destructor Documentation

◆ Error()

wasmtime::Error::Error ( wasmtime_error_t error)
inline

Creates an error from the raw C API representation.

Takes ownership of the provided error.

Member Function Documentation

◆ i32_exit()

std::optional< int32_t > wasmtime::Error::i32_exit ( ) const
inline

If this trap represents a call to exit for WASI, this will return the optional error code associated with the exit trap.

◆ trace()

Trace wasmtime::Error::trace ( ) const
inline

Returns the trace of WebAssembly frames associated with this error.

Note that the trace cannot outlive this error object.


The documentation for this class was generated from the following files: