Exception: ChefDK::PolicyfileNestedException

Inherits:
PolicyfileServiceError show all
Defined in:
lib/chef-dk/service_exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, cause) ⇒ PolicyfileNestedException

Returns a new instance of PolicyfileNestedException.



53
54
55
56
57
# File 'lib/chef-dk/service_exceptions.rb', line 53

def initialize(message, cause)
  super(message)
  @inspector = inspector_for(cause)
  @cause = cause
end

Instance Attribute Details

#causeObject (readonly)

Returns the value of attribute cause.



50
51
52
# File 'lib/chef-dk/service_exceptions.rb', line 50

def cause
  @cause
end

#inspectorObject (readonly)

Returns the value of attribute inspector.



51
52
53
# File 'lib/chef-dk/service_exceptions.rb', line 51

def inspector
  @inspector
end

Instance Method Details

#extended_error_infoObject



63
64
65
# File 'lib/chef-dk/service_exceptions.rb', line 63

def extended_error_info
  inspector.extended_error_info
end

#reasonObject



59
60
61
# File 'lib/chef-dk/service_exceptions.rb', line 59

def reason
  "(#{cause.class.name}) #{inspector.message}"
end