Label exception with type

This commit is contained in:
Michael Miller 2019-03-03 10:30:58 -07:00
parent 6307024af3
commit 8310ea2aa5

View file

@ -94,7 +94,7 @@ module Spectator::Formatting
# Display a single error and its stacktrace. # Display a single error and its stacktrace.
private def display_error(indent, error) : Nil 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 indent.increase do
error.backtrace.each do |frame| error.backtrace.each do |frame|
indent.line(Color.error(frame)) indent.line(Color.error(frame))