Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
hide Exception.throw and .rethrow from backtrace
  • Loading branch information
moritz committed Nov 1, 2011
1 parent 666f399 commit 0f941b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Exception.pm
Expand Up @@ -11,13 +11,13 @@ my class Exception {
self.Str.Numeric()
}

method throw() {
method throw() is hidden_from_backtrace {
nqp::bindattr(self, Exception, '$!ex', pir::new('Exception'))
unless pir::defined($!ex);
pir::setattribute__vPsP($!ex, 'payload', nqp::p6decont(self));
pir::throw__0P($!ex)
}
method rethrow() {
method rethrow() is hidden_from_backtrace {
pir::rethrow__0P($!ex)
}

Expand Down

0 comments on commit 0f941b3

Please sign in to comment.