Invokes the given block, handling UserError errors.
33 34 35 36 37 38
# File 'lib/codebot/options.rb', line 33 def self.with_errors yield rescue UserError => e STDERR.puts "Error: #{e.message}" exit 1 end