Jump to content

Exceptions: Difference between revisions

m
(→‎shortened catch: .err to _err)
Line 1,534:
 
A catch causes all the statements preceding it within a block to be the implicit try block.
 
An else section on a catch is optional (available from version 0.5.0 and higher).
 
<lang langur># do something
Line 1,551 ⟶ 1,549:
...
}</lang>
 
An else section on a catch is optional. As of 0.7, you can also use else if on a catch. The parser wraps it into the else block of the catch, so that it looks the same to the compiler and VM.
 
=== shortened catch ===
1,007

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.