Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
hide hidden routines from backtraces
  • Loading branch information
moritz committed Aug 22, 2011
1 parent 19cfd13 commit b1882a1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/BackTrace.pm
Expand Up @@ -12,6 +12,7 @@ my class BackTraceLine {
" in $.subtype $.subname at {$.file}:$.line\n"
}

method is-hidden { $!code.?is_hidden_from_backtrace }
method is-routine { $!code ~~ Routine }
method is-setting { $!file eq 'src/gen/CORE.setting' }
}
Expand Down Expand Up @@ -49,11 +50,11 @@ my class BackTrace is List {
}

method concise(BackTrace:D:) {
self.grep({ .is-routine && !.is-setting }).join
self.grep({ !.is-hidden && .is-routine && !.is-setting }).join
}

multi method Str(BackTrace:D:) {
self.grep({ .is-routine || !.is-setting }).join
self.grep({ !.is-hidden && (.is-routine || !.is-setting )}).join
}

method full(BackTrace:D:) {
Expand Down

0 comments on commit b1882a1

Please sign in to comment.