Anonymous user
Exceptions/Catch an exception thrown in a nested call: Difference between revisions
Exceptions/Catch an exception thrown in a nested call (view source)
Revision as of 16:19, 9 September 2014
, 9 years ago→{{header|Aime}}
Line 51:
=={{header|Aime}}==
<lang aime>void
baz(integer i
{
}
void
bar(integer i
{
baz(i
}
Line 70 ⟶ 69:
i = 0;
while (i < 2) {
o_form("Exception `~' thrown\n", e);
if (e != "U0") {
Line 93 ⟶ 92:
}</lang>
{{out}}
<pre>
Exception `U1' thrown
will not catch exception
aime:
Exception U0 is caught, exception U1 is caught and re-thrown. Program execution is terminated as the U1 exception is not caught when thrown the second time.
|