Skip to content

Commit 0ffcf6a

Browse files
committed
Revert making catchless trys possible, keeping the simpler execution
rules for try. The execution rules don't need to refer to "catchful" trys, checking during validation suffices.
1 parent 191a7aa commit 0ffcf6a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

proposals/exception-handling/Exceptions-formal-overview.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ exntype ::= [t*] -> []
1616

1717
```
1818
instr ::= ... | throw x | rethrow l
19-
| try bt instr* (catch x instr*)* (catch_all instr*)? end
19+
| try bt instr* (catch x instr*)+ end
20+
| try bt instr* (catch x instr*)* catch_all instr* end
2021
| try bt instr* delegate l
2122
| try bt instr* unwind instr* end
2223
```
@@ -60,9 +61,10 @@ bt = [t1*] -> [t2*]
6061
C, label [t2*] |- instr* : [t1*] -> [t2*]
6162
(C_exn(x_i) = [t'_i*] -> [])^n
6263
(C, label [t2*], caught x_i |- instr_i* : [t'_i*] -> [t2*])^n
63-
(C, label [t2*], caught all |- instr'* : [] -> [t2*])?
64+
(C, label [t2*], caught all |- instr'* : [] -> [t2*])^k
65+
(k=0 and n>0) or (k=1 and n≥0)
6466
------------------------------------------------------------------
65-
try bt instr* (catch x_i instr_i*)^n (catch_all instr'*)? end : bt
67+
try bt instr* (catch x_i instr_i*)^n (catch_all instr'*)^k end : bt
6668
6769
6870
bt = [t1*] -> [t2*]

0 commit comments

Comments
 (0)