Fox has asked for the wisdom of the Perl Monks concerning the following question:
but this hangs, and the output:try { die "test"; CATCH { say $!; die "exp: [$!]"; } }
looks like the CATCH block is re-catching the new exception ? I expected it would throw the exception to an outer scope, am I doing something wrong here ? how can I accomplish that ?test exp: [test] exp: [exp: [test]] exp: [exp: [exp: [test]]] exp: [exp: [exp: [exp: [test]]]] exp: [exp: [exp: [exp: [exp: [test]]]]] exp: [exp: [exp: [exp: [exp: [exp: [test]]]]]] exp: [exp: [exp: [exp: [exp: [exp: [exp: [test]]]]]]] . . .
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl6: exceptions
by moritz (Cardinal) on Sep 15, 2010 at 12:04 UTC | |
by Fox (Pilgrim) on Sep 15, 2010 at 12:44 UTC |