in reply to perl6: exceptions

looks like the CATCH block is re-catching the new exception ?

Indeed that's what happens; it's a known (and long standing) bug in Rakudo.

I expected it would throw the exception to an outer scope, am I doing something wrong here ?
Your expectations are fine, and in line with the specification.
how can I accomplish that ?

You can either fix the bug in Rakudo, or work around it with something like

my $rethrow; try { die "test"; CATCH { say $!; $rethrow = $! } } die $rethrow;

I'm sorry for the inconvenience.

Perl 6 - links to (nearly) everything that is Perl 6.

Replies are listed 'Best First'.
Re^2: perl6: exceptions
by Fox (Pilgrim) on Sep 15, 2010 at 12:44 UTC
    ahh thanks again Moritz, and you don't have to be sorry ! I'm just playing around with rakudo. and I should learn to search the bugtracker.