Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
reinstate new FALLBACK mechanism for type Failure
But since is meant to not trigger as a fallback for .CALL-ME and
.postcircumfix:<( )>, we need to add one of these on our own.
  • Loading branch information
FROGGS committed May 22, 2015
1 parent 30766c1 commit 1cb6c15
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/core/Failure.pm
Expand Up @@ -37,15 +37,15 @@ my class Failure {
self.exception.message ~ "\n" ~ self.backtrace;
}

Failure.^add_fallback(
-> $, $ { True },
method ($name) {
$!exception.throw;
}
);
method sink() {
$!exception.throw($!backtrace) unless $!handled
}
method CALL-ME(|) {
$!exception.throw($!backtrace)
}
method FALLBACK(*@) {
$!exception.throw($!backtrace)
}
}

proto sub fail(|) {*};
Expand Down

0 comments on commit 1cb6c15

Please sign in to comment.