Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
make Backtrace.new() DWIM
  • Loading branch information
moritz committed Nov 24, 2011
1 parent d5d5a3f commit de3997a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/Backtrace.pm
Expand Up @@ -29,6 +29,11 @@ my class Backtrace is List {
self.new(nqp::getattr(nqp::p6decont($e), Exception, '$!ex').backtrace, $offset);
}

multi method new() {
try { die() };
self.new($!, 3);
}

# note that parrot backtraces are RPAs, marshalled to us as Parcel
multi method new(Parcel $bt, Int $offset = 0) {
my $new = self.bless(*);
Expand Down

0 comments on commit de3997a

Please sign in to comment.