protected function JsonPathParser::getErrors in Feeds extensible parsers 8
Returns the errors after parsing.
Return value
array A structured array array with keys:
- message: The error message.
- variables: The variables for the message.
- severity: The severity of the message.
Overrides ParserBase::getErrors
See also
watchdog()
File
- src/
Feeds/ Parser/ JsonPathParser.php, line 87
Class
- JsonPathParser
- Defines a JSON parser using JSONPath.
Namespace
Drupal\feeds_ex\Feeds\ParserCode
protected function getErrors() {
if (!function_exists('json_last_error')) {
return [];
}
if (!($error = json_last_error())) {
return [];
}
$message = [
'message' => $this->utility
->translateError($error),
'variables' => [],
'severity' => RfcLogLevel::ERROR,
];
return [
$message,
];
}