def example_failed(example, counter, failure)
      first_time = true

      failure.exception.backtrace.reverse.each do |frame|
        file, line, message = parse_backtrace(frame)
        message = failure.header if message.blank?

        if first_time and failure.exception.message.present?
          first_time = false
          message += failure.exception.message
        end

        @output.puts "%s:%d %d %s" % [file, line, counter, message]
        @output.flush

        MULTI_LINE_ERRORS or break
      end
    end
def example_failed(example, counter, failure)
      first_time = true

      failure.exception.backtrace.reverse.each do |frame|
        file, line, message = parse_backtrace(frame)
        message = failure.header if message.blank?

        if first_time and failure.exception.message.present?
          first_time = false
          message += failure.exception.message
        end

        @output.puts "%s:%d %d %s" % [file, line, counter, message]
        @output.flush

        MULTI_LINE_ERRORS or break
      end
    end
use with this errorformat
 set errorformat=%f:%l\ %n\ %m