Non-standard: This feature is non-standard and is not on a standards track. Do not use it on production sites facing the Web: it will not work for every user. There may also be large incompatibilities between implementations and the behavior may change in the future.
The read-only stack
property of an object instance of type WebAssembly.Exception
may contain a stack trace.
Exceptions from WebAssembly code do not include a stack trace by default.
If WebAssembly code needs to provide a stack trace, it must call a JavaScript function to create the exception, passing options.traceStack=true
parameter in the constructor. The virtual machine can then attach a stack trace to the exception object returned by the constructor.
Note: Stack traces are not normally sent from WebAssembly code to improve performance. The ability to add stack traces to these exceptions is provided for developer tooling, and is not generally recommended for broader use.