Exception: ChefZero::DataStore::DataError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/chef_zero/data_store/data_error.rb

Direct Known Subclasses

DataAlreadyExistsError, DataNotFoundError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path, cause = nil) ⇒ DataError

Returns a new instance of DataError.



24
25
26
27
28
29
# File 'lib/chef_zero/data_store/data_error.rb', line 24

def initialize(path, cause = nil)
  @path = path
  @cause = cause
  path_for_msg = path.nil? ? "nil" : "/#{path.join("/")}"
  super "Data path: #{path_for_msg}"
end

Instance Attribute Details

#causeObject (readonly)

Returns the value of attribute cause.



22
23
24
# File 'lib/chef_zero/data_store/data_error.rb', line 22

def cause
  @cause
end

#pathObject (readonly)

Returns the value of attribute path.



22
23
24
# File 'lib/chef_zero/data_store/data_error.rb', line 22

def path
  @path
end