WebAssembly exception handling instructions

WebAssembly exception handling instructions.

Throw

throw

Throws an exception of a specified type, as defined by a tag definition.

throw_ref

Rethrows a previously-thrown exception represented by an exnref value.

Try

try_table

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

catch

Catches exceptions matching a specified error tag, pushing the exception payload to the stack.

catch_all

Catches any exception and pushes nothing to the stack.

catch_ref

Catches exceptions matching a specified error tag, pushing the exception payload and an exnref value representing the exception to the stack.

catch_all_ref

Catches any exception and pushes an exnref value representing the exception to the stack.

See also