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:
parent
9402d019a5
commit
50bb8b6052
1 changed files with 1 additions and 7 deletions
|
@ -858,13 +858,7 @@ eom
|
||||||
msg = "exceptions on #{errs.length} threads:\n" +
|
msg = "exceptions on #{errs.length} threads:\n" +
|
||||||
errs.map {|t, err|
|
errs.map {|t, err|
|
||||||
"#{t.inspect}:\n" +
|
"#{t.inspect}:\n" +
|
||||||
err.backtrace.map.with_index {|line, i|
|
err.full_message(highlight: false, order: :top)
|
||||||
if i == 0
|
|
||||||
"#{line}: #{err.message} (#{err.class})"
|
|
||||||
else
|
|
||||||
"\tfrom #{line}"
|
|
||||||
end
|
|
||||||
}.join("\n")
|
|
||||||
}.join("\n---\n")
|
}.join("\n---\n")
|
||||||
if message
|
if message
|
||||||
msg = "#{message}\n#{msg}"
|
msg = "#{message}\n#{msg}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue