Exception: PDK::CLI::ExitWithError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/pdk/cli/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(msg, opts = {}) ⇒ ExitWithError

Returns a new instance of ExitWithError.



16
17
18
19
20
# File 'lib/pdk/cli/errors.rb', line 16

def initialize(msg, opts = {})
  @exit_code = opts.fetch(:exit_code, 1)
  @log_level = opts.fetch(:log_level, :error)
  super(msg)
end

Instance Attribute Details

#exit_codeObject (readonly)

Returns the value of attribute exit_code.



13
14
15
# File 'lib/pdk/cli/errors.rb', line 13

def exit_code
  @exit_code
end

#log_levelObject (readonly)

Returns the value of attribute log_level.



14
15
16
# File 'lib/pdk/cli/errors.rb', line 14

def log_level
  @log_level
end