Module: ChefDK::NestedExceptionWithInspector
- Included in:
- ChefRunnerError, PolicyfileNestedException
- Defined in:
- lib/chef-dk/service_exceptions.rb
Instance Attribute Summary collapse
-
#cause ⇒ Object
readonly
Returns the value of attribute cause.
-
#inspector ⇒ Object
readonly
Returns the value of attribute inspector.
Instance Method Summary collapse
- #extended_error_info ⇒ Object
- #initialize(message, cause) ⇒ Object
- #message ⇒ Object
- #reason ⇒ Object
- #to_s ⇒ Object
Instance Attribute Details
#cause ⇒ Object (readonly)
Returns the value of attribute cause.
29 30 31 |
# File 'lib/chef-dk/service_exceptions.rb', line 29 def cause @cause end |
#inspector ⇒ Object (readonly)
Returns the value of attribute inspector.
30 31 32 |
# File 'lib/chef-dk/service_exceptions.rb', line 30 def inspector @inspector end |
Instance Method Details
#extended_error_info ⇒ Object
43 44 45 |
# File 'lib/chef-dk/service_exceptions.rb', line 43 def extended_error_info inspector.extended_error_info end |
#initialize(message, cause) ⇒ Object
32 33 34 35 36 37 |
# File 'lib/chef-dk/service_exceptions.rb', line 32 def initialize(, cause) super() @message = @inspector = inspector_for(cause) @cause = cause end |
#message ⇒ Object
47 48 49 |
# File 'lib/chef-dk/service_exceptions.rb', line 47 def @message end |
#reason ⇒ Object
39 40 41 |
# File 'lib/chef-dk/service_exceptions.rb', line 39 def reason "(#{cause.class.name}) #{inspector.}" end |
#to_s ⇒ Object
51 52 53 |
# File 'lib/chef-dk/service_exceptions.rb', line 51 def to_s "#{}\nCaused by: #{reason}" end |