예제 #1
0
파일: XmlDb.php 프로젝트: bizio/xmlreader
 /**
  * Execute a PDOStatement and throws an exception in case of any error
  * 
  * @param \PDOStatement $st
  * @throws \Exception
  */
 private function _execute(\PDOStatement $st)
 {
     if (!$st->execute()) {
         $this->_db->rollBack();
         $error = $st->errorInfo();
         throw new \Exception('Error trying to execute query "' . $st->queryString . '": ' . $error[2]);
     }
 }