Check if the data structure contains any errors.
 @return [Boolean] true if no erros were found, false otherwise
329476
def check
      return false unless @btree.check

      i = 0
      each do |k, v|
        i += 1
      end

      unless @entry_counter == i
        PEROBS.log.error "BigHash contains #{i} values but entry counter " +
          "is #{@entry_counter}"
        return false
      end

      true
    end
978540
function valid_errors(errors) {

  /**
   *  Return false if [errors] is empty or if it isn't a non-empty array.
   */

  if (! errors) {
    return false;
  } else {
    if (! (errors instanceof Array)) {
      return false;
    } else {
      if (errors.length === 0) {
        return false;
      }
    }
  }

  return true;

}
1085329
def validate
      is_valid = true

      pages.each do |page|
        # Loop through pages to get all errors
        is_valid = false if page.invalid?
      end

      is_valid
    end
926956
def check_errors(self, data):
        """"""

        if (type(data) == dict and 'status' in data.keys()
            and data['status'] == 'failed'):
            if data.get('exception_msg') and 'last_id' in data.get('exception_msg'):
                raise PyBossaServerNoKeysetPagination
            else:
                raise Error(data)
        return False
642316
def check_failures(object)
      check object
    rescue CheckFailed => e
      return e.errors.map { |e| e.protocol_message }
    end
250102
def error(message)
      (m = filter(message, :error)) && each {|l| l.error(m)}
    end
324861
def is_error(o):
    """"""
    if hasattr(o, 'error') and hasattr(o, 'error_description') and hasattr(o, 'status'):
        return True
    return False
194858
def _check_for_misplaced(xs, subkey, other_keys):
    
    problems = []
    for x in xs:
        check_dict = x.get(subkey, {})
        for to_check in other_keys:
            if to_check in check_dict:
                problems.append((x["description"], to_check, subkey))
    if len(problems) > 0:
        raise ValueError("\n".join(["Incorrectly nested keys found in sample YAML. These should be top level:",
                                    " sample         |   key name      |   nested under ",
                                    "----------------+-----------------+----------------"] +
                                   ["% 15s | % 15s | % 15s" % (a, b, c) for (a, b, c) in problems]))
147456
def valid?
      @errors = []
      @critical_keys.each do |k|
        any_error = public_send(k).nil?
        @errors << k if any_error
      end

      @errors.size == 0
    end
436063
public boolean checkError() {
        if (out != null) {
            flush();
        }
        if (out instanceof java.io.PrintWriter) {
            PrintWriter pw = (PrintWriter) out;
            return pw.checkError();
        } else if (psOut != null) {
            return psOut.checkError();
        }
        return trouble;
    }
442087
function isConflictError (err) {
    // return false if err is not an object
    if (typeof err !== 'object') {
        return false
    }
    // return false if error does not have mysql duplicate key code
    if (err.errno !== 1062) {
        return false
    }
    // return false if duplicate key error is not on parent id column
    if (err.message.indexOf(this.model.columnName('parentId')) === -1) {
        return false
    }
    // if all negative tests pass return true
    return true
}
137138
public function hasErrors($includeNested = true)
    {
        if (Hash::filter($this->_errors)) {
            return true;
        }

        if ($includeNested === false) {
            return false;
        }

        foreach ($this->_properties as $property) {
            if ($this->_readHasErrors($property)) {
                return true;
            }
        }

        return false;
    }
1343097
def check_arguments(params, *args)
      contains = true
      args.each do |arg|
        contains = false unless params.key? arg.to_sym
      end
      contains
    end
683950
def check_errors
      if @value && @value.is_a?(Numeric)
        if @args.is_a?(Hash)

          @args.each do |arg, val|
            case arg
            when :min
              add_error("number must be greater than #{val}") if @value < val
            when :max
              add_error("number must be less than #{val}") if @value > val
            end
          end

        end
      else
        message = (@args.is_a?(Hash) && @args[:message]) || 'must be a number'
        add_error(message)
      end
    end
301423
public function hasError(): bool
    {
        foreach ($this->getResultSets() as $resultSet) {
            if ($resultSet->getResponse()->hasError()) {
                return true;
            }
        }

        return false;
    }
795859
def valid?
      @errors = []

      if !bank_transaction_id.nil? && bank_transaction_id !~ GUID_REGEX
        @errors << ['bank_transaction_id', 'must be blank or a valid Xero GUID']
      end

      if type && !TYPES[type]
        @errors << ['type', "must be one of #{TYPES.keys.join('/')}"]
      end

      if status && !STATUSES[status]
        @errors << ['status', "must be one of #{STATUSES.keys.join('/')}"]
      end

      unless date
        @errors << ['date', "can't be blank"]
      end

      # Make sure contact is valid.
      unless @contact && @contact.valid?
        @errors << ['contact', 'is invalid']
      end

      # Make sure all line_items are valid.
      unless line_items.all? { | line_item | line_item.valid? }
        @errors << ['line_items', "at least one line item invalid"]
      end

      @errors.size == 0
    end
578388
def check
      raise Errors::ConfigurationInvalid, config.errors.join("; ") unless config.valid?
      distribution.check
    end