StandardError
Exception class for collecting multiple failures. Used when running delayed notifications so that chef can process each delayed notification even if chef client or other notifications fail.
# File lib/chef/exceptions.rb, line 183 def client_run_failure(exception) set_backtrace(exception.backtrace) @all_failures << [ "chef run", exception ] end
# File lib/chef/exceptions.rb, line 198 def empty? @all_failures.empty? end
# File lib/chef/exceptions.rb, line 202 def for_raise if @all_failures.size == 1 @all_failures[0][1] else self end end
# File lib/chef/exceptions.rb, line 176 def message base = "Multiple failures occurred:\n" @all_failures.inject(base) do |message, (location, error)| message << "* #{error.class} occurred in #{location}: #{error.message}\n" end end
Generated with the Darkfish Rdoc Generator 2.