You are here

protected function FeedsExBase::printErrors in Feeds extensible parsers 7

Same name and namespace in other branches
  1. 7.2 src/FeedsExBase.inc \FeedsExBase::printErrors()

Prints errors to the screen.

Parameters

array $errors: A list of errors as returned by stopErrorHandling().

int $severity: (optional) Limit to only errors of the specified severity. Defaults to WATCHDOG_ERROR.

See also

watchdog()

1 call to FeedsExBase::printErrors()
FeedsExBase::parse in src/FeedsExBase.inc

File

src/FeedsExBase.inc, line 324
Contains FeedsExBase.

Class

FeedsExBase
The Feeds extensible parser.

Code

protected function printErrors(array $errors, $severity = WATCHDOG_ERROR) {
  foreach ($errors as $error) {
    if ($error['severity'] > $severity) {
      continue;
    }
    $this
      ->getMessenger()
      ->setMessage(t($error['message'], $error['variables']), $error['severity'] <= WATCHDOG_ERROR ? 'error' : 'warning', FALSE);
  }
}