class Nokogiri::XML::SyntaxError
def aggregate(errors)
def aggregate(errors) return nil if errors.empty? return errors.first if errors.length == 1 messages = ["Multiple errors encountered:"] errors.each do |error| messages << error.to_s end new(messages.join("\n")) end