Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
give Exception a backtrace method
  • Loading branch information
moritz committed Oct 3, 2011
1 parent 59d442b commit 7823a4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/core/Exception.pm
@@ -1,6 +1,8 @@
my class Exception {
has $!ex;

method backtrace() { Backtrace.new(self) }

method Str() {
nqp::p6box_s(nqp::atkey($!ex, 'message'))
}
Expand Down
1 change: 0 additions & 1 deletion src/core/Exceptions.pm
@@ -1,7 +1,6 @@
# XXX should really be my X::Base eventually
my package X {
class Base is Exception {
has $.backtrace;
has $.message;

multi method Str(Base:D:) {
Expand Down

0 comments on commit 7823a4c

Please sign in to comment.