Exceptions: Difference between revisions

(add Zig example)
Line 1,560:
 
=={{header|langur}}==
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.
 
Exceptions in langur are hashes guaranteed to contain certain fields, even if they're empty.
 
<lang langur># do something
Line 1,579:
}</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 ===
885

edits