MDN / WebAssembly exception handling instructions
MDN / WebAssembly exception handling instructions
WebAssembly exception handling instructions.
Throw
: Throws an exception of a specified type, as defined by a
tagdefinition.
: Rethrows a previously-thrown exception represented by an
exnrefvalue.
Try
: Enables you to test a block of code to see whether it throws an exception, handling the exception with a catch clause clause if so.
Catch clauses
: Catches exceptions matching a specified error
tag, pushing the exception payload to the stack.
: Catches any exception and pushes nothing to the stack.
: Catches exceptions matching a specified error
tag, pushing the exception payload and anexnrefvalue representing the exception to the stack.
: Catches any exception and pushes an
exnrefvalue representing the exception to the stack.
See also
exnreftypetagdefinitionWebAssembly.ExceptionJavaScript interfaceWebAssembly.TagJavaScript interface