Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Clarify descriptions of control flow operators #340

Merged
merged 1 commit into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions proposals/exception-handling/legacy/Exceptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -703,9 +703,9 @@ throws, and rethrows as follows:
| `try` | `0x06` | sig : `blocktype` | begins a block which can handle thrown exceptions |
| `catch` | `0x07` | index : `varint32` | begins the catch block of the try block |
| `catch_all` | `0x19` | | begins the catch_all block of the try block |
| `delegate` | `0x18` | relative_depth : `varuint32` | begins the delegate block of the try block |
| `throw` | `0x08` | index : `varint32` | Creates an exception defined by the tag and then throws it |
| `rethrow` | `0x09` | relative_depth : `varuint32` | Pops the `exnref` on top of the stack and throws it |
| `delegate` | `0x18` | relative_depth : `varuint32` | ends the current try block and delegates any exceptions to the block at `relative_depth` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! It looks the old text is a copy-pasta of catch description...

| `throw` | `0x08` | index : `varint32` | creates an exception defined by the tag and then throws it |
| `rethrow` | `0x09` | relative_depth : `varuint32` | throws the exception caught by the catch block at `relative_depth` |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm it looks like the remnants of the pre-legacy proposal that preceded the legacy proposal. Thanks for the catch.


The *sig* fields of `block`, `if`, and `try` operators are block signatures
which describe their use of the operand stack.