DanielXMoore / Civet

A TypeScript superset that favors more types and less typing
https://civet.dev
MIT License
1.33k stars 28 forks source link

try else blocks #1229

Closed edemaine closed 1 month ago

edemaine commented 1 month ago

Fixes #1134

edemaine commented 1 month ago

I forgot to mention: the fun innovation here relative to #1134 is the idea of putting the else block inside the finally block, which keeps everything "contained" within the try block. Also, we don't need to double-wrap when we have both else and finally blocks. We still achieve the goal of the else block not wrapped in try..catch.