Jump to content

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

→‎{{header|Perl}}: Both exceptions are caught.
No edit summary
(→‎{{header|Perl}}: Both exceptions are caught.)
Line 1,381:
 
=={{header|Perl}}==
{{incorrect|Perl|Both exceptions are caught and one is is re-raised. If this is the only way to do the task then please add a note to this example; otherwise modify to not catch the second exception.}}
<lang perl>sub foo {
foreach (0..1) {
Line 1,405 ⟶ 1,406:
...propagated at exceptionsnested.pl line 5.
</pre>
 
=={{header|Perl 6}}==
{{trans|Perl}}
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.