Improved try/catch/finally to explain the options better.

This commit is contained in:
Carl Smith
2015-05-01 22:38:25 +01:00
parent b6667f0735
commit 8e8f6d13bd

View File

@@ -874,9 +874,9 @@ Expressions
<p>
<span id="try" class="bookmark"></span>
<b class="header">Try/Catch/Finally</b>
Try/catch statements are just about the same as in JavaScript, with a few
additions: They work as expressions, and you may omit saving the error in
the catchor the entire catch itselfif you don't need it.
Try-expressions have the same semantics as try-statements in JavaScript,
though in CoffeeScript, you may omit <em>both</em> the catch and finally
parts. The catch part may also omit the error parameter if it is not needed.
</p>
<%= codeFor('try') %>