MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime-go / Message

Method Message

trap.go:94–101  ·  view source on GitHub ↗

Message returns the message of the `Trap`

()

Source from the content-addressed store, hash-verified

92
93// Message returns the message of the `Trap`
94func (t *Trap) Message() string {
95 message := C.wasm_byte_vec_t{}
96 C.wasm_trap_message(t.ptr(), &message)
97 ret := C.GoStringN(message.data, C.int(message.size-1))
98 runtime.KeepAlive(t)
99 C.wasm_byte_vec_delete(&message)
100 return ret
101}
102
103// Code returns the code of the `Trap` if it exists, nil otherwise.
104func (t *Trap) Code() *TrapCode {

Callers 3

TestTrapFunction · 0.95
ExampleConfig_interruptFunction · 0.95
ErrorMethod · 0.95

Calls 1

ptrMethod · 0.95

Tested by 2

TestTrapFunction · 0.76
ExampleConfig_interruptFunction · 0.76