class Chef::Exceptions::RunFailedWrappingError
If a converge fails, we want to wrap the output from those errors into 1 error so we can see both issues in the output. It is possible that nil will be provided. You must call ‘fill_backtrace` to correctly populate the backtrace with the wrapped backtraces.
Attributes
Public Class Methods
Source
# File lib/chef/exceptions.rb, line 490 def initialize(*errors) errors = errors.compact output = "Found #{errors.size} errors, they are stored in the backtrace" @wrapped_errors = errors super output end
Calls superclass method
Public Instance Methods
Source
# File lib/chef/exceptions.rb, line 497 def fill_backtrace backtrace = [] wrapped_errors.each_with_index do |e, i| backtrace << "#{i + 1}) #{e.class} - #{e.message}" backtrace += e.backtrace if e.backtrace backtrace << "" unless i == wrapped_errors.length - 1 end set_backtrace(backtrace) end