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

→‎{{header|Ada}}: U1 left unhandled
m (→‎{{header|D}}: pre not lang)
(→‎{{header|Ada}}: U1 left unhandled)
Line 39:
Foo;
end loop;
exception
when U1 =>
Put_line("Exception U1 passed through foo");
end Exceptions_From_Nested_Calls;</lang>
Sample output:
<pre>
Procedure Foo caught exception U0
 
Exception U1 passed through foo</pre>
raised EXCEPTIONS_FROM_NESTED_CALLS.U1 : exceptions_from_nested_calls.adb:13
</pre>
 
=={{header|D}}==