Exception: PDK::CLI::ExitWithError
- Inherits:
-
StandardError
- Object
- StandardError
- PDK::CLI::ExitWithError
- Defined in:
- lib/pdk/cli/errors.rb
Instance Attribute Summary collapse
-
#exit_code ⇒ Object
readonly
Returns the value of attribute exit_code.
-
#log_level ⇒ Object
readonly
Returns the value of attribute log_level.
Instance Method Summary collapse
-
#initialize(msg, opts = {}) ⇒ ExitWithError
constructor
A new instance of ExitWithError.
Constructor Details
#initialize(msg, opts = {}) ⇒ ExitWithError
Returns a new instance of ExitWithError.
17 18 19 20 21 |
# File 'lib/pdk/cli/errors.rb', line 17 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_code ⇒ Object (readonly)
Returns the value of attribute exit_code.
15 16 17 |
# File 'lib/pdk/cli/errors.rb', line 15 def exit_code @exit_code end |
#log_level ⇒ Object (readonly)
Returns the value of attribute log_level.
15 16 17 |
# File 'lib/pdk/cli/errors.rb', line 15 def log_level @log_level end |