This repository was archived by the owner on Apr 25, 2025. It is now read-only.
File tree 1 file changed +3
-3
lines changed
proposals/exception-handling
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 121
121
A try-catch block contains zero or more ` catch ` blocks and zero or one
122
122
` catch_all ` block. All ` catch ` blocks must precede the ` catch_all ` block, if
123
123
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.
126
127
127
128
The _ body_ of the try block is the list of instructions before the first
128
129
catching instruction. The _ body_ of each catch block is the sequence of
@@ -411,7 +412,6 @@ The following rules are added to *instructions*:
411
412
throw (exception except_index) |
412
413
rethrow label |
413
414
```
414
- (In the first rule, there should be at least one ` catch ` or ` catch_all ` block.)
415
415
416
416
Like the ` block ` , ` loop ` , and ` if ` instructions, the ` try ` instruction is
417
417
* structured* control flow instruction, and can be labeled. This allows branch
You can’t perform that action at this time.
0 commit comments