MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / Trap

Method Trap

crates/c-api/include/wasmtime/trap.hh:117–118  ·  view source on GitHub ↗

Creates a new host-defined trap with the specified message.

Source from the content-addressed store, hash-verified

115
116 /// Creates a new host-defined trap with the specified message.
117 explicit Trap(std::string_view msg)
118 : Trap(wasmtime_trap_new(msg.data(), msg.size())) {}
119
120 /// Creates a new trap with the given wasmtime trap code.
121 Trap(wasmtime_trap_code_enum code) : Trap(wasmtime_trap_new_code(code)) {}

Callers 1

Calls 4

wasmtime_trap_newFunction · 0.85
wasmtime_trap_new_codeFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected