Skip Menu |
Report information
Id: 127711
Status: open
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: bri [at] abrij.org
Cc:
AdminCc:

Severity: (no value)
Tag: (no value)
Platform: (no value)
Patch Status: (no value)
VM: (no value)



Subject: Presence of inner CATCH block prevents resumption from outer CATCH block
Download (untitled) / with headers
text/plain 514b
$ perl6 -e '{ 42.say; X::AdHoc.new(:payload(43)).throw; 44.say; CATCH { }; }; CATCH { when X::AdHoc { $_.message.say; $_.resume } }' 42 43 Trying to unwind over wrong handler Notably this prevents resuming exceptions thrown from inside a Lock.protect block. Without the inner CATCH block, works as expected: $ perl6 -e '{ 42.say; X::AdHoc.new(:payload(43)).throw; 44.say; }; CATCH { when X::AdHoc { $_.message.say; $_.resume } }' 42 43 44 IRC discussion: http://irclog.perlgeek.de/perl6/2016-03-14#i_12182095
Download (untitled) / with headers
text/plain 261b
Still present in today's rakudo 2ad323: <Zoffix> m: { 42.say; X::AdHoc.new(:payload(43)).throw; 44.say; CATCH { }; }; CATCH { when X::AdHoc { $_.message.say; $_.resume } } <camelia> rakudo-moar 2ad323: OUTPUT«42␤43␤Trying to unwind over wrong handler␤»


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at perl.org