| ;;; TOOL: wat2wasm | |
| ;;; ARGS: --enable-exceptions | |
| (module | |
| (tag (param i32)) | |
| ;; no catch | |
| (func | |
| try | |
| nop | |
| end) | |
| ;; bare | |
| (func | |
| try | |
| nop | |
| catch 0 | |
| drop | |
| end) | |
| ;; with label | |
| (func | |
| try $foo | |
| nop | |
| catch 0 | |
| drop | |
| end) | |
| ;; with result type | |
| (func | |
| try (result i32) | |
| i32.const 1 | |
| catch 0 | |
| drop | |
| i32.const 2 | |
| end | |
| drop)) |