From 8310ea2aa5b2c611d5a74ba79e30c7ca399a109d Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Sun, 3 Mar 2019 10:30:58 -0700 Subject: [PATCH] Label exception with type --- src/spectator/formatting/failure_block.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/spectator/formatting/failure_block.cr b/src/spectator/formatting/failure_block.cr index 6d241bd..743cf4b 100644 --- a/src/spectator/formatting/failure_block.cr +++ b/src/spectator/formatting/failure_block.cr @@ -94,7 +94,7 @@ module Spectator::Formatting # Display a single error and its stacktrace. private def display_error(indent, error) : Nil - indent.line(Color.error("Caused by: #{error.message} (#{error.class})")) + indent.line(Color.error(LabeledText.new(error.class.to_s, error))) indent.increase do error.backtrace.each do |frame| indent.line(Color.error(frame))