Exception: MotherBrain::DataBagNotFound

Inherits:
ChefError show all
Defined in:
lib/mb/errors.rb

Constant Summary

Constants inherited from MBError

MBError::DEFAULT_EXIT_CODE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from MBError

#error_code, error_code, exit_code, #exit_code, #to_hash, #to_json, #to_s

Constructor Details

#initialize(name) ⇒ DataBagNotFound

Returns a new instance of DataBagNotFound.



623
624
625
# File 'lib/mb/errors.rb', line 623

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



621
622
623
# File 'lib/mb/errors.rb', line 621

def name
  @name
end

Instance Method Details

#messageObject



627
628
629
# File 'lib/mb/errors.rb', line 627

def message
  "A Data Bag named '#{name}' could not be found"
end