Exceptions: Difference between revisions

Content added Content deleted
m (→‎{{header|Sidef}}: updated code)
Line 1,613: Line 1,613:
}</syntaxhighlight>
}</syntaxhighlight>


An else section on a catch is optional. As of 0.7, you can also use else if on a catch.
An else section on a catch is optional. You can also use else if.


=== exception variable ===
=== exception variable ===
An exception variable may be specified, or you can simply use the implicit variable, which is _err. Prior to 0.7, the implicit exception variable was .err.
An exception variable may be specified, or you can simply use the implicit variable, which is _err.


<syntaxhighlight lang="langur">100 / 0
<syntaxhighlight lang="langur">100 / 0