Exceptions/Catch an exception thrown in a nested call: Difference between revisions

(→‎{{header|Go}}: Add a much simpler Go example.)
Line 50:
 
=={{header|Aime}}==
{{incorrect|Aime|Logic should test for U0 and pass other exceptions}}
<lang aime>void
baz(integer i, text &exception)
Line 74 ⟶ 73:
 
if (trap(bar, i, e)) {
o_text o_form("Exception `~' thrown\n", e);
o_text if (e != "U0"); {
o_text("' thrown\n");
if (!compare(e, "U1")) {
o_text("will not catch exception\n");
error(e);
Anonymous user