Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
in Exception, make sure we have a parrot exception before throwing
  • Loading branch information
moritz committed Aug 3, 2011
1 parent 69e9988 commit 0c51f85
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/core/Exception.pm
Expand Up @@ -6,6 +6,9 @@ my class Exception {
}

method throw() {
nqp::bindattr(self, Exception, '$!ex', pir::new('Exception'))
unless pir::defined($!ex);
pir::setattribute__vPsP($!ex, 'payload', pir::perl6_decontainerize__PP(self));
pir::throw__0P($!ex)
}
method rethrow() {
Expand Down

0 comments on commit 0c51f85

Please sign in to comment.