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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl6: exceptions
by Fox (Pilgrim) on Sep 15, 2010 at 12:44 UTC |