Creates a new host-defined trap with the specified message.
| 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)) {} |
no test coverage detected