1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Use Exception#full_message for traceback

This commit is contained in:
Nobuyoshi Nakada 2019-06-14 08:15:39 +09:00
parent 9402d019a5
commit 50bb8b6052
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60

View file

@ -858,13 +858,7 @@ eom
msg = "exceptions on #{errs.length} threads:\n" +
errs.map {|t, err|
"#{t.inspect}:\n" +
err.backtrace.map.with_index {|line, i|
if i == 0
"#{line}: #{err.message} (#{err.class})"
else
"\tfrom #{line}"
end
}.join("\n")
err.full_message(highlight: false, order: :top)
}.join("\n---\n")
if message
msg = "#{message}\n#{msg}"