Exceptions: Difference between revisions
m
→{{header|langur}}
Langurmonkey (talk | contribs) |
Langurmonkey (talk | contribs) |
||
Line 1,530:
</pre>
=={{header|
Exceptions in langur are hashes guaranteed to contain certain fields, even if they're empty.
Line 1,537:
An else section on a catch is optional (available from version 0.5.0 and higher).
<lang
throw "not a math exception"
Line 1,557:
A shortened catch does not allow an else section (action for no exception).
<lang
# change result
} else {
Line 1,563:
}</lang>
<lang
.safediv(7, 7) # 1
.safediv(7, 0) # 0</lang>
|