diff --git a/Command.php b/Command.php index c325e55..1fa74fa 100644 --- a/Command.php +++ b/Command.php @@ -147,7 +147,7 @@ class Command extends Component try { $client = $this->connection->getConnection(); if (($prepare = $client->prepare($this->sql)) === false) { - throw new Exception($client->errorInfo()[1]); + throw new Exception('(' . $prepare->errorInfo()[0] . ')' . $prepare->errorInfo()[2]); } if ($prepare->execute($this->params) === false) { throw new Exception('(' . $prepare->errorInfo()[0] . ')' . $prepare->errorInfo()[2]);