If an exception has newlines, render them well

This commit is contained in:
Max Howell 2009-10-01 15:41:15 +01:00
parent db2ccd294d
commit 5c33fdfb5b

View File

@ -34,7 +34,9 @@ def opoo warning
end end
def onoe error def onoe error
puts "\033[1;31m==>\033[0;0;1m Error\033[0;0m: #{error}" lines = error.to_s.split'\n'
puts "\033[1;31m==>\033[0;0;1m Error\033[0;0m: #{lines.shift}"
puts *lines unless lines.empty?
end end
def pretty_duration s def pretty_duration s