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 17:37, 14 July 2022
, 1 year agofix code and add output
(fix code and add output) |
|||
Line 2,098:
=={{header|Maple}}==
<lang Maple>baz := proc( which )▼
if ( which = 0 ) then
error "U0";
▲baz := proc()
else
end;
end proc:
bar := proc( which )
baz( which );
end proc
foo := proc()
local i;
for i from 0 to 1 do
bar(i);
catch "U0":
end;
end do;
end proc
foo();</lang>
{{out}}
<lang Maple>Error, (in baz) U1</lang>
=={{header|Mathematica}} / {{header|Wolfram Language}}==
|