Exceptions: Difference between revisions
→shortened catch: .err to _err
Langurmonkey (talk | contribs) |
Langurmonkey (talk | contribs) (→shortened catch: .err to _err) |
||
Line 1,553:
=== shortened catch ===
A catch can be shortened by using a single expression that does not start with a variable name. This uses the implicit _err exception variable.
A shortened catch does not allow an else section (action for no exception).
Line 1,559:
<lang langur>100 / 0
catch if
# change result
123
|