/**
  * Exception constructor
  * 
  * @param Reader         $reader   Csv reader triggering the exception
  * @param array          $headers  Csv headers
  * @param array          $row      Csv row
  * @param integer        $code     Exception code
  * @param Exception|null $previous Previous exception
  */
 public function __construct(Reader $reader, array $headers, array $row, $code = 0, Exception $previous = null)
 {
     $this->reader = $reader;
     $this->headers = $headers;
     $this->row = $row;
     parent::__construct(sprintf('CSV : Wrong column count ! Expected : %s, found : %s (row : %s) at line %s', count($headers), count($row), json_encode($row), $reader->key()), $code, $previous);
 }
Пример #2
0
 /**
  * {@inheritDoc}
  */
 public function key()
 {
     return $this->internal->key();
 }