Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Presence of inner CATCH block prevents resumption from outer CATCH block #5177

Open
p6rt opened this issue Mar 14, 2016 · 3 comments
Open

Presence of inner CATCH block prevents resumption from outer CATCH block #5177

p6rt opened this issue Mar 14, 2016 · 3 comments
Labels

Comments

@p6rt
Copy link

p6rt commented Mar 14, 2016

Migrated from rt.perl.org#127711 (status was 'open')

Searchable as RT127711$

@p6rt
Copy link
Author

p6rt commented Mar 14, 2016

From @skids

$ 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

@p6rt
Copy link
Author

p6rt commented Jul 10, 2016

From @zoffixznet

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␤»

@p6rt
Copy link
Author

p6rt commented Aug 23, 2016

@coke - Status changed from 'new' to 'open'

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant