Skip to content

Commit

Permalink
Indent stack trace
Browse files Browse the repository at this point in the history
  • Loading branch information
icy-arctic-fox committed Aug 5, 2024
1 parent bb9bf14 commit 041c7dd
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/spectator/formatters/common_text_output.cr
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,11 @@ module Spectator::Formatters
printer.print_label(:error, &.<< "#{error.class}: ")
printer.puts "#{error.message}"

error.backtrace?.try &.each do |frame|
frame = frame.colorize.dim if external_frame?(frame)
printer.puts frame
printer.indent do
error.backtrace?.try &.each do |frame|
frame = frame.colorize.dim if external_frame?(frame)
printer.puts frame
end
end

if cause = error.cause
Expand Down

0 comments on commit 041c7dd

Please sign in to comment.