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.
In reply to Re: perl6: exceptions
by moritz
in thread perl6: exceptions
by Fox
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |