Exceptions: Difference between revisions

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. As just one example, you could put an unscoped catch at the end of a script and it will cover the entire script.
 
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>
 
990

edits