From 041c7ddce5358007c6d83d7782b1b62c15827722 Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Mon, 5 Aug 2024 00:10:24 -0600 Subject: [PATCH] Indent stack trace --- src/spectator/formatters/common_text_output.cr | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/spectator/formatters/common_text_output.cr b/src/spectator/formatters/common_text_output.cr index 3a0edb52..e50de00a 100644 --- a/src/spectator/formatters/common_text_output.cr +++ b/src/spectator/formatters/common_text_output.cr @@ -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