Method: Chef::Resource#custom_exception_message

Defined in:
lib/chef/resource.rb

#custom_exception_message(e) ⇒ String

Preface an exception message with generic Resource information.

Parameters:

  • e (StandardError)

    An exception with ‘e.message`

Returns:

  • (String)

    An exception message customized with class name.


1556
1557
1558
# File 'lib/chef/resource.rb', line 1556

def custom_exception_message(e)
  "#{self} (#{defined_at}) had an error: #{e.class.name}: #{e.message}"
end