public function handleError(\Plop\RecordInterface $record, \Exception $exception) { if ($this->closeOnError) { $this->close(); } return parent::handleError($record, $exception); }