Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
return Nil from a try when an error was thrown
  • Loading branch information
moritz committed Dec 10, 2012
1 parent f5a8f2b commit 9831e45
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Perl6/Actions.pm
Expand Up @@ -1110,7 +1110,6 @@ class Perl6::Actions is HLL::Actions does STDActions {

# On failure, capture the exception object into $!.
'CATCH', QAST::Stmts.new(
:resultchild(0),
QAST::Op.new(
:op('p6store'),
QAST::Var.new(:name<$!>, :scope<lexical>),
Expand All @@ -1123,7 +1122,10 @@ class Perl6::Actions is HLL::Actions does STDActions {
pirop => 'perl6_invoke_catchhandler 1PP',
QAST::Op.new( :op('null') ),
QAST::Op.new( :op('exception') )
)
),
QAST::WVal.new(
:value( $*W.find_symbol(['Nil']) ),
),
)
);
}
Expand Down

0 comments on commit 9831e45

Please sign in to comment.