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

Commit 7eff14a

Browse files
authored
Allow catch/delegate-less trys (#157)
This was suggested here: #131 (comment) Closes #131.
1 parent a5e87e4 commit 7eff14a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

proposals/exception-handling/Exceptions.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,9 @@ end
121121
A try-catch block contains zero or more `catch` blocks and zero or one
122122
`catch_all` block. All `catch` blocks must precede the `catch_all` block, if
123123
any. The `catch`/`catch_all` instructions (within the try construct) are called
124-
the _catching_ instructions. There should be at least one `catch` or `catch_all`
125-
block within a try-catch block.
124+
the _catching_ instructions. There may not be any `catch` or `catch_all` blocks
125+
after a `try`, in which case the whole `try` block is effectively a regular
126+
block.
126127

127128
The _body_ of the try block is the list of instructions before the first
128129
catching instruction. The _body_ of each catch block is the sequence of
@@ -411,7 +412,6 @@ The following rules are added to *instructions*:
411412
throw (exception except_index) |
412413
rethrow label |
413414
```
414-
(In the first rule, there should be at least one `catch` or `catch_all` block.)
415415

416416
Like the `block`, `loop`, and `if` instructions, the `try` instruction is
417417
*structured* control flow instruction, and can be labeled. This allows branch

0 commit comments

Comments
 (0)