public function FeedImportProcessor::errorHandler in Feed Import 7.3
Error handler callback This is setted with set_error_handling()
File
- feed_import_base/
inc/ feed_import.inc, line 706 - This file contains Feed Import helpers.
Class
- FeedImportProcessor
- Class that processess the import.
Code
public function errorHandler($errno, $errmsg, $file, $line) {
// Handle silenced errors with @.
if (error_reporting() == 0) {
return FALSE;
}
// Add error to reports.
if ($this->errorsLeft) {
$this->report['errors'][] = array(
'error' => $errmsg,
'error number' => $errno,
'line' => $line,
'file' => $file,
);
$this->errorsLeft--;
}
// Throw an exception to be caught by a try-catch statement.
if ($this->throwException) {
throw new Exception("(Uncaught Feed Import Exception) [{$errmsg}; file: {$file}; line: {$line}]", $errno);
}
}