Forum | Documentation | Website | Blog

Skip to content
Snippets Groups Projects
Commit 62e0f95a authored by Ary Borenszweig's avatar Ary Borenszweig
Browse files

Better colors for compiler error mesasges (on white background you couldn't read them)

parent 4fd67170
No related merge requests found
......@@ -76,7 +76,7 @@ module Crystal
options_parser, inline_exp, filenames, arguments = process_options_internal(options)
rescue ex : OptionParser::Exception
print "Error: ".colorize.red.bold
puts ex.message.colorize.white.bold
puts ex.message.colorize.bold
exit 1
end
......@@ -341,7 +341,7 @@ module Crystal
end
puts
print "Error: ".colorize.red.bold
puts "you've found a bug in the Crystal compiler. Please open an issue: https://github.com/manastech/crystal/issues".colorize.white.bright
puts "you've found a bug in the Crystal compiler. Please open an issue: https://github.com/manastech/crystal/issues".colorize.bright
exit 2
end
end
......
......@@ -30,9 +30,9 @@ module Crystal
def append_to_s(source, io)
if @filename
io << "Syntax error in #{@filename}:#{@line_number}: #{@message.colorize.white.bold}"
io << "Syntax error in #{@filename}:#{@line_number}: #{@message.colorize.bold}"
else
io << "Syntax error in line #{@line_number}: #{@message.colorize.white.bold}"
io << "Syntax error in line #{@line_number}: #{@message.colorize.bold}"
end
source = fetch_source(source)
......@@ -166,7 +166,7 @@ module Crystal
if @inner
io << msg
else
io << msg.colorize.white.bold
io << msg.colorize.bold
end
end
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment