class Rake::Task

def add_chain_to(exception, new_chain)

def add_chain_to(exception, new_chain)
  exception.extend(InvocationExceptionMixin) unless exception.respond_to?(:chain)
  exception.chain = new_chain if exception.chain.nil?
end