@param iterable $errors

@return void
548261
public function addErrors(iterable $errors): void
    {
        foreach ($errors as $error) {
            $this->addError($error);
        }
    }
39317
private static function setErrors($errors) {

        $std_rpc_errors = array(
            -32700 => "Parse error",
            -32701 => "Parse error - Unsupported encoding",
            -32702 => "Parse error - Invalid character for encoding",
            -32600 => "Invalid Request",
            -32601 => "Method not found",
            -32602 => "Invalid params",
            -32603 => "Internal error",
            -32500 => "Application error",
            -32400 => "System error",
            -32300 => "Transport error",
            // Predefined Comodojo Errors
            -31000 => "Multicall is available only in XMLRPC",
            -31001 => "Recursive system.multicall forbidden"
        );

        foreach ( $std_rpc_errors as $code => $message ) {

            $errors->add($code, $message);

        }

    }
1145883
private function parseErrorSection(array $errors)
    {
        if (array_key_exists('invalidFilters', $errors)) {
            $this->jsonErrors[] = new JSONError(JSONError::INVALID_FILTER, $errors['invalidFilters']);
        }
        if (array_key_exists('invalidQueryParams', $errors)) {
            $this->jsonErrors[] = new JSONError(JSONError::INVALID_QUERYPARAMS, $errors['invalidQueryParams']);
        }
        if (array_key_exists('invalidLanguage', $errors)) {
            $this->jsonErrors[] = new JSONError();
        }
    }
587493
public function errorInTabs($counters) {
		if (empty($this->current_tab) || empty($counters)) {
			return;
		}
		if (!isset($this->errors['tabs'])) {
			$this->errors['tabs'] = [];
		}
		// we need to process errors in a special way
		foreach ($counters as $type => $counter) {
			$current_tab = $this->current_tab;
			do {
				$key = implode('__', $current_tab) . '__' . $type;
				$current_value = array_key_get($this->errors['tabs'], $key);
				if (is_null($current_value)) {
					$current_value = 0;
				}
				array_key_set($this->errors['tabs'], $key, $current_value + $counter);
				array_pop($current_tab);
			} while (count($current_tab) > 0 && $type != 'records');
		}
	}
41351
public function writeError( $s )
	{
		$message = $this->cleanMessage( $s );

		if ( ! empty( $message ) )
		{
			$this->bag[] = array( self::ERROR , $message );
		}
	}
1340371
private function importErrors(array $errors): void
    {
        foreach ($errors as $field => $errors) {
            foreach ($errors as $message) {
                $this->addError($message, $field);
            }
        }
    }
1120869
public void setErrors(java.util.Collection<ErrorDetail> errors) {
        if (errors == null) {
            this.errors = null;
            return;
        }

        this.errors = new java.util.ArrayList<ErrorDetail>(errors);
    }
486571
protected function listValidationErrors(array $errors, OutputInterface $output)
    {
        if (count($errors) === 1) {
            $this->stdErr->writeln('The following error was found:');
        } else {
            $this->stdErr->writeln(sprintf(
                'The following %d errors were found:',
                count($errors)
            ));
        }

        foreach ($errors as $key => $error) {
            if (is_string($key) && strlen($key)) {
                $output->writeln("$key: $error");
            } else {
                $output->writeln($error);
            }
        }
    }
246524
public function addErrors(array $errors)
    {
        foreach ($errors as $code => $message) {
            $this->addError($code, $message);
        }
    }
459787
public function removeIterable(iterable $enumerators): void
    {
        $map = $this->map;
        foreach ($enumerators as $enumerator) {
            $ord = ($this->enumeration)::get($enumerator)->getOrdinal();
            unset($map[$ord]);
        }

        $this->map = $map;
    }
1047729
private function setError($error)
    {
        if (strpos($error, 'ERROR') !== false) {
            if (array_key_exists($error, $this->errors)) {
                throw new Exception($this->errors[$error]);
            } else {
                throw new Exception($error);
            }
        }
    }
1226551
protected function sendHttpHeaders(iterable $headers):void
    {
        foreach ($headers as $header => $value) {
            header("$header: $value", false);
        }
    }
519799
public static function setError($id, $errors, $element = "")
    {
        if (!is_array($errors)) {
            $errors = array($errors);
        }

        if (empty($_SESSION["form"][$id]["errors"][$element])) {
            $_SESSION["form"][$id]["errors"][$element] = array();
        }

        foreach ($errors as $error) {
            $_SESSION["form"][$id]["errors"][$element][] = $error;
        }
    }
1038603
protected function write($messages): void
    {
        if (! \is_array($messages)) {
            $messages = [$messages];
        }

        foreach ($messages as $i => $message) {
            $messages[$i] = '    - ' . $message;
        }

        $this->io->writeError($messages, true, IOInterface::VERBOSE);
    }
579439
protected function setErrors(\Asgard\Validation\Report $errors) {
		foreach($errors->attributes() as $name=>$_errors) {
			if(isset($this->fields[$name]))
				$this->fields[$name]->setErrors($_errors);
		}
	}
496112
private function throwExceptionIfErrors(ConstraintViolationListInterface $errors): void
    {
        if (0 === $errors->count()) {
            return;
        }
        throw ValidationException::create($errors, $this->dataObject);
    }
369257
public function isValid(?array &$errors = null): bool
	{
		[$isValid, $errors] = $this->process();

		return $isValid === true;
	}