Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Backtrace.nice can now produce single lines
  • Loading branch information
moritz committed Apr 10, 2012
1 parent b8fdbea commit 32c674e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/Backtrace.pm
Expand Up @@ -95,7 +95,7 @@ my class Backtrace is List {
return @outers;
}

method nice() {
method nice(:$oneline) {
try {
my @frames;
my Int $i = self.next-interesting-index(-1);
Expand All @@ -111,6 +111,7 @@ my class Backtrace is List {
@frames.push: $current.clone(line => $prev.line);
$i = $target_idx;
}
last if $oneline;
$i = self.next-interesting-index($i);
}
return @frames.join;
Expand Down

0 comments on commit 32c674e

Please sign in to comment.