Output the collection of errors.

@param $errors
@return void
321774
protected function outputErrors($errors)
    {
        foreach ($errors as $path => $error) {
            $this->output->writeln($this->color('error', $path . ':'));
            $this->output->writeln($error);
            $this->output->writeln('');
        }
    }
1281663
protected function errors(array $errors): array
    {
        $final = [];
        foreach ($errors as $errorId => $details) {
            if ($details instanceOf ParamError) {
                $final[$errorId] = $details;
            } else {
                $final[$errorId] = ParamError::fromData($errorId, $details);
            }
        }

        return [null, $final];
    }
1178626
protected function printLegend(bool $errors, bool $warnings): void
    {
        if ($errors) {
            $this->output->write('<fg=red>F</>');
        } elseif ($warnings) {
            $this->output->write('<fg=yellow>W</>');
        } else {
            $this->output->write('<info>.</info>');
        }
    }
1139716
public function error(array $errors): Response
    {
        $this->response->setStatus(500);
        $bodyTemplate = '<html><title>Error 500</title><h1>Server Error</h1><pre>%s</pre></html>';
        $this->response->setBody(sprintf($bodyTemplate, print_r($errors, true)));
        return $this->response;
    }
768332
def display_errors
      errors.each do |path, errors|
        puts path
        errors.each do |err|
          puts "  #{err}"
        end
      end
    end
548261
public function addErrors(iterable $errors): void
    {
        foreach ($errors as $error) {
            $this->addError($error);
        }
    }
704300
protected function renderErrors(array $files, OutputInterface $output)
    {
        foreach ($files as $file) {
            $output->writeln('<file>' . $file->getFilename() . '</file>');

            $this->renderMessages($file->getErrors(), $output);

            $output->writeln('');
        }
    }
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);
    }
27113
public function formatErrors(array $errors)
   {
      $tmp = [];
      $len = count($errors);
      if ($len === 0) {
         throw new InvalidArgumentException(
            "invalid value provided for 'errors'; expecting an array that ".
            "contains at least one instance of sndsgd\\field\\Error"
         );
      }

      $noun = ($len === 1) ? 'option' : 'options';
      $tmp = ["failed to process $noun"];
      foreach ($errors as $error) {
         $name = $error->getName();
         $message = $error->getMessage();
         if (!array_key_exists($name, $tmp)) {
            $tmp[$name] = " @[bold]$name@[reset] → $message";
         }
      }
      return implode(PHP_EOL, array_values($tmp)).PHP_EOL;
   }
593435
protected function formatErrors(string $errors)
    {
        $errors = json_decode($errors);
        $output = '';

        foreach ($errors as $error)
            foreach ($error as $message)
                $output .= $message . "\r\n";

        return $output;
    }
246524
public function addErrors(array $errors)
    {
        foreach ($errors as $code => $message) {
            $this->addError($code, $message);
        }
    }
118625
private function set_errors( $errors )
    {
        if( count( $errors ) == 0 )
        {
            return;
        }
        
        $errors_array = array();
        foreach( $this->config->get_sections() as $section )
        {
            foreach( $section->get_fields() as $component )
            {
                if( $component instanceof \Amarkal\UI\ValidatableComponentInterface && $errors[$component->get_name()] )
                {
                    $errors_array[] = array(
                        'section'=> $section->get_slug(),
                        'message'=> $errors[$component->get_name()]
                    );
                }
            }
        }
        State::set('errors', $errors_array);
    }
990603
public function storeRuleFailed(array $errors)
    {
        $url     = handles('antares::ban_management/rules/datatable');
        $message = trans('antares/ban_management::response.rules.create.db-failed', $errors);

        return $this->redirectWithMessage($url, $message, 'error');
    }
123987
public function addErrors(array $errors)
    {
        foreach ($errors as $error) {
            if (!$error instanceof ValidationError)
                throw new Exception('Error was not instance of ValidationError: '.$error);
            if (!in_array($error, $this->errors))
                $this->errors[] = $error;
        }

        return $this;
    }
1267631
public function execute($errors = null)
    {
        $batch = $this->getBatch();

        foreach ((array) $errors as $error) {
            $batch->addToCounter('import_errors');
            $batch->addMessage($error);
        }
    }
512790
public function setErrors($errors)
    {
        $this->errors = strtolower((string) $errors);

        $message = sprintf("Set errors flag to [%s].", $this->errors);
        $this->log($message, Project::MSG_DEBUG);
    }
1291540
public function formatErrors($title = '')
    {
        $errorsStr = PHP_EOL;
        
        foreach ($this->errors as $k => $error) {
            $details = [];
            
            if (isset($error['details']) && is_array($error['details'])) {
                foreach ($error['details'] as $name => $value) {
                    $details[] = sprintf('%s:%s', $name, $value);
                }
            }
            
            $body = sprintf(
                'key: %smessage: %sdetails: %s',
                $error['key'] . PHP_EOL,
                $error['message'] . PHP_EOL,
                implode(' | ', $details) . PHP_EOL
            );
            $errorsStr .= $body . self::ERROR_OUTPUT_SEPARATOR . PHP_EOL;
        }
    
        $messageTemplate = $title . PHP_EOL
            . 'Response code: %s' . PHP_EOL
            . 'Response errors (%s): %s%s' . PHP_EOL;
    
        $output = vsprintf(
            $messageTemplate,
            [
                $this->getCode(),
                count($this->errors),
                PHP_EOL . self::ERROR_OUTPUT_SEPARATOR,
                $errorsStr,
            ]
        );
        
        return $output;
    }