protected function FeedsExJmesPath::getErrors in Feeds extensible parsers 7
Same name and namespace in other branches
- 7.2 src/FeedsExJmesPath.inc \FeedsExJmesPath::getErrors()
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 FeedsExBase::getErrors
See also
watchdog()
File
- src/
FeedsExJmesPath.inc, line 254 - Contains FeedsExJmesPath.
Class
- FeedsExJmesPath
- Parses JSON documents with JMESPath.
Code
protected function getErrors() {
if (!function_exists('json_last_error')) {
return array();
}
if (!($error = json_last_error())) {
return array();
}
$message = array(
'message' => FeedsExJsonUtility::translateError($error),
'variables' => array(),
'severity' => WATCHDOG_ERROR,
);
return array(
$message,
);
}