Callback fro RSpec. Returns a human-readable failure message.

 @return [String]
977201
def failure_message
      matching_files = @fixture.files & @local.files
      fixture_only_files = @fixture.files - @local.files
      local_only_files = @local.files - @fixture.files
      buf = "expected fixture #{@fixture.path} to match files:\n"
      (@fixture.files | @local.files).sort.each do |file|
        if matching_files.include?(file)
          local_file = @local.absolute(file)
          fixture_file = @fixture.absolute(file)
          if File.directory?(local_file) && File.directory?(fixture_file)
            # Do nothing
          elsif File.directory?(fixture_file)
            buf << "  #{file} should be a directory\n"
          elsif File.directory?(local_file)
            buf << "  #{file} should not be a directory"
          else
            actual = IO.read(local_file)
            expected = IO.read(fixture_file)
            if actual != expected
              # Show a diff
              buf << "  #{file} does not match fixture:"
              buf << differ.diff(actual, expected).split(/\n/).map {|line| '    '+line }.join("\n")
            end
          end
        elsif fixture_only_files.include?(file)
          buf << "  #{file} is not found\n"
        elsif local_only_files.include?(file)
          buf << "  #{file} should not exist\n"
        end
      end
      buf
    end
1078919
def display_error_message(ex)
      $stderr.puts "#{name} aborted!"
      $stderr.puts ex.message
      $stderr.puts ex.backtrace.join("\n")
    end
767926
def raise_status_error
      message = format(
        'expected response stati: %s but got: %s, remote message: %s',
        expected_response_stati,
        response.status,
        remote_message.inspect
      )
      fail ProtocolError, message
    end
1051256
def raise_error_if_failed!(result)
      return if result.status.statusCode == 0
      error_message = result.status.errorMessage || 'Execution failed!'
      raise RBHive::TCLIConnectionError.new(error_message)
    end
335611
def fail(message, print_usage = false)
      puts "** #{message}"
      puts Usage.scan(__FILE__) if print_usage
      exit(1)
    end
241659
def extract_exception(payload)
      return {} unless payload[:exception]

      exception, message = payload[:exception]
      status = ActionDispatch::ExceptionWrapper.status_code_for_exception(exception)
      error_source = $!.backtrace.find { |line| line.match(/\A#{Rails.root}/) }

      result = { status: status }
      result[:error_class] = exception
      result[:error_message] = message
      result[:error_source] = error_source.gsub(/\A#{Dir.pwd}/, '') if error_source
      result[:error_backtrace] = $!.backtrace
      if $!.respond_to?(:cause) && $!.cause
        result[:error_cause] = [$!.cause.class.to_s, $!.cause.message].concat($!.cause.backtrace)
      end
      result
    end
1256061
def _get_errors(self):
        
        errors = self.json.get('data').get('failures')
        if errors:
            logger.error(errors)
        return errors
716185
def evaluate(actual, expected)
      failure_message = expected_message.size_of(actual).to_be(expected).not(actual.size)
      expected === actual.size ? pass(new_message.is_of_size(expected)) : fail(failure_message)
    end
768332
def display_errors
      errors.each do |path, errors|
        puts path
        errors.each do |err|
          puts "  #{err}"
        end
      end
    end
1241396
def getErrorInfoFromResponse
      if @responseXMLdoc
         errcode = getResponseValue( :errcode )
         @errcode = errcode ? errcode : ""
         errtext = getResponseValue( :errtext )
         @errtext = errtext ? errtext : ""
         errdetail = getResponseValue( :errdetail )
         @errdetail = errdetail ? errdetail : ""
         if @errcode != "0"
            @lastError = "Error code: #{@errcode} text: #{@errtext}: detail: #{@errdetail}"
         end
      end
      @lastError
   end
334238
def get_typeof_error name
      pspec = get_pspec name
      raise Vips::Error unless pspec

      pspec[:value][:value_type]
    end
942429
def exception_logger(error)
      Rails.logger.error("\n#{error.class} #{error.message} in #{error.backtrace.first}")
      Rails.logger.error(error.backtrace[1..50].each { |line|
        line.gsub(/#{Rails.root.to_s}/, '')
      }.join("\n"))
    end
647312
def error_message(response)
      method = response[:method].to_s.upcase
      url = response[:url].to_s
      status = response[:body][:status]
      error = response[:body][:error]
      "#{method} #{url}: #{status} - #{error}"
    end
943543
def summary
      # Guard against the exceptions array being removed/changed or emptied here
      if exceptions.respond_to?(:first) && exceptions.first
        {
          :error_class => exceptions.first[:errorClass],
          :message => exceptions.first[:message],
          :severity => severity
        }
      else
        {
          :error_class => "Unknown",
          :severity => severity
        }
      end
    end
1007393
private function getFailedFooter(): string
    {
        $formatString = "FAILURES!\nTests: %d, Assertions: %d, Failures: %d, Errors: %d.\n";

        return "\n" . $this->red(
            sprintf(
                $formatString,
                $this->results->getTotalTests(),
                $this->results->getTotalAssertions(),
                $this->results->getTotalFailures(),
                $this->results->getTotalErrors()
            )
        );
    }
703994
def error_messages
      self.errors.map do |e|
        msg = nil
        if e
          msg = e[:text]
          msg += ": #{e[:fieldName]}" unless e[:fieldName].blank?
        end
        msg
      end
    end
771604
private String[] getFailureAnnouncementSegments() {
        String value = Optional.fromNullable(getParameter(SignalParameters.FAILURE_ANNOUNCEMENT.symbol())).or("");
        return value.isEmpty() ? new String[0] : value.split(",");
    }