Module: Canoe::Err

Included in:
CmdParser, DepAnalyzer, DepAnalyzer, WorkSpace, ConfigReader
Defined in:
lib/util.rb

Overview

Colorized error messages with abortion

Instance Method Summary collapse

Instance Method Details

#abort_on_err(err) ⇒ Object



90
91
92
93
94
95
96
# File 'lib/util.rb', line 90

def abort_on_err(err)
  abort "        \#{'Fatal: '.red}\n            \#{err}\n        try 'canoe help' for more information\n      ERR\nend\n"

#warn_on_err(err) ⇒ Object



82
83
84
85
86
87
88
# File 'lib/util.rb', line 82

def warn_on_err(err)
  puts "       \#{'Waring: '.yellow}\n           \#{err}\n       try 'canoe help' for more information\n     ERR\nend\n"