Method: Codebot::Options.with_errors

Defined in:
lib/codebot/options.rb

.with_errorsObject

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