Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make panic always throw X::Comp::AdHoc.
This also means all the panics get the location included in the error.
  • Loading branch information
jnthn committed Dec 3, 2012
1 parent 6b01881 commit a109e73
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Perl6/Grammar.pm
Expand Up @@ -201,6 +201,10 @@ role STD {
}
$lang_cursor.nibbler();
}

method panic(*@args) {
$*W.throw(self.MATCH, < X Comp AdHoc >, payload => nqp::join('', @args))
}
}

grammar Perl6::Grammar is HLL::Grammar does STD {
Expand Down

0 comments on commit a109e73

Please sign in to comment.