Skip to content

Commit

Permalink
Implement die's default of fetching $!
Browse files Browse the repository at this point in the history
Search in caller's lexical scope, including outers.
  • Loading branch information
vrurg committed Jul 12, 2019
1 parent 44ba0f2 commit a17d465
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/control.pm6
Expand Up @@ -167,7 +167,7 @@ sub done(--> Nil) {

proto sub die(|) {*};
multi sub die(--> Nil) {
my $stash := CALLER::;
my $stash := CALLER::LEXICAL::;
my $payload = $stash<$!>.DEFINITE ?? $stash<$!> !! "Died";
$payload ~~ Exception
?? $payload.throw
Expand Down

0 comments on commit a17d465

Please sign in to comment.