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

LEAVE doesn't trigger when an exception is thrown #3160

Closed
p6rt opened this issue Jun 9, 2013 · 6 comments
Closed

LEAVE doesn't trigger when an exception is thrown #3160

p6rt opened this issue Jun 9, 2013 · 6 comments

Comments

@p6rt
Copy link

p6rt commented Jun 9, 2013

Migrated from rt.perl.org#118387 (status was 'rejected')

Searchable as RT118387$

@p6rt
Copy link
Author

p6rt commented Jun 9, 2013

From @tadzik

S04 says​:

LEAVE {...} [executes] at every block exit time (even stack unwinds from
exceptions)

Running perl6 version 2013.05-15-gcd5ca7c built on parrot 5.2.0 revision
RELEASE_5_2_0​:

sub foo { LEAVE { say "OK" }; die "died" }; foo()
died

According to the spec, this should also say OK

@p6rt
Copy link
Author

p6rt commented Oct 9, 2014

From @usev6

The described problem (no 'OK' is printed) persists on Parrot but works fine on Moar and JVM​:

$ perl6-p -e 'sub foo { LEAVE { say "OK" }; die "died" }; foo()' 2>/dev/null
$ perl6-m -e 'sub foo { LEAVE { say "OK" }; die "died" }; foo()' 2>/dev/null
OK
$ perl6-j -e 'sub foo { LEAVE { say "OK" }; die "died" }; foo()' 2>/dev/null
OK

I added a test (skipped for Parrot) to S04-phasers/enter-leave.t with the following commit​: Raku/roast@6e02af8c84

1 similar comment
@p6rt
Copy link
Author

p6rt commented Oct 9, 2014

From @usev6

The described problem (no 'OK' is printed) persists on Parrot but works fine on Moar and JVM​:

$ perl6-p -e 'sub foo { LEAVE { say "OK" }; die "died" }; foo()' 2>/dev/null
$ perl6-m -e 'sub foo { LEAVE { say "OK" }; die "died" }; foo()' 2>/dev/null
OK
$ perl6-j -e 'sub foo { LEAVE { say "OK" }; die "died" }; foo()' 2>/dev/null
OK

I added a test (skipped for Parrot) to S04-phasers/enter-leave.t with the following commit​: Raku/roast@6e02af8c84

@p6rt
Copy link
Author

p6rt commented Oct 9, 2014

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

@p6rt
Copy link
Author

p6rt commented Feb 27, 2015

From @usev6

Since support for Parrot was suspended with Rakudo Star Release 2015.02, I'm closing this "parrot only" ticket.

I added the ticket to a list of closed ticket living in the Mu repository​: https://github.com/perl6/mu/blob/master/misc/rt.perl.org/tickets_closed_parrot_only.txt.

In case support for Parrot will be restored in some future release the listed tickets can be checked and re-opened as appropriate.

@p6rt
Copy link
Author

p6rt commented Feb 27, 2015

@usev6 - Status changed from 'open' to 'rejected'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant