Commit 5991d6f9 authored by Eloy Duran's avatar Eloy Duran

Some 'informative' messages should just be plain simple.

parent 0cbb1568
......@@ -3,7 +3,10 @@ Encoding.default_external = Encoding::UTF_8 if RUBY_VERSION > '1.8.7'
module Pod
VERSION = '0.6.0.rc1'
class Informative < StandardError
class PlainInformative < StandardError
end
class Informative < PlainInformative
def message
#TODO: remove formatting from raise calls and remove conditional
super !~ /\[!\]/ ? "[!] #{super}\n".red : super
......
......@@ -73,7 +73,7 @@ module Pod
Config.instance.verbose? ? raise : exit(1)
rescue Exception => e
if e.is_a?(Informative)
if e.is_a?(PlainInformative) # also catches Informative
puts e.message
puts *e.backtrace if Config.instance.verbose?
else
......@@ -84,7 +84,7 @@ module Pod
def self.parse(*argv)
argv = ARGV.new(argv)
raise Informative, VERSION if argv.option('--version')
raise PlainInformative, VERSION if argv.option('--version')
show_help = argv.option('--help')
Config.instance.silent = argv.option('--silent')
......
Markdown is supported
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