# New Ticket Created by  "Brian S. Julin" 
# Please include the string:  [perl #127711]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=127711 >


$ 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

Reply via email to