The WebAssembly.Exception()
constructor is used to create a new WebAssembly.Exception
.
The constructor accepts a Tag
argument and a payload
array of data fields. The data types of each of the payload elements must match the corresponding data type specified in the Tag
.
The constructor may also take an options
object. The options.traceStack
property can be set true
(by default it is false
) to indicate that a WASM stack trace may be attached to the exception's stack
property.