/** * Execute an SQL query * * Displays a more informative exception. * Old one attached as previous exception. * * @param string $sql * @return \Zend\Db\Adapter\Driver\Pdo\Result * @throws InvalidQueryException * @codeCoverageIgnore */ public function execute($sql) { try { return parent::execute($sql); } catch (InvalidQueryException $exception) { throw new InvalidQueryException($exception->getMessage() . ':' . PHP_EOL . $sql, $exception->getCode(), $exception); } }