Display first line only after "Error:"

This commit is contained in:
Michael Miller 2020-08-16 10:00:04 -06:00
parent ca03e75b99
commit 53c9dd0445
No known key found for this signature in database
GPG Key ID: FB9F12F7C646A4AD
1 changed files with 2 additions and 1 deletions

View File

@ -77,7 +77,8 @@ module Spectator::Formatting
# Produces the stack trace for an errored result.
private def error_stacktrace(indent)
error = @result.error
indent.line(Color.error(LabeledText.new("Error", error)))
first_line = error.message.try(&.lines).try(&.first)
indent.line(Color.error(LabeledText.new("Error", first_line)))
indent.line
indent.increase do
loop do