Exceptions: Difference between revisions
→{{header|Langur}}
Langurmonkey (talk | contribs) |
|||
Line 1,533:
Exceptions in langur are hashes guaranteed to contain certain fields, even if they're empty.
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,545 ⟶ 1,547:
throw
}
} else {
# no exception
...
}</lang>
|