ZF-5683: Get natural DB error no.

Description

Most DB has its own error number, when an exception happens. In my project, I want to get its own error number to do some operations, but using Zend_DB,

I can't get it. So I suggest adding a natrual DB number, when throwing a DB exception.

for example: library\Zend\Db\Statement\Mysqli.php line 215

     before:
     throw new Zend_Db_Statement_Mysqli_Exception("Mysqli statement execute error : " . 

$this->_stmt->error);

     after:
     throw new Zend_Db_Statement_Mysqli_Exception("Mysqli statement execute error : " . 

$this->_stmt->error, $this->_stmt->errorno);

To adapte all DB, we can create a suit of error no. for Zend_DB, and map them to different DB error no. in 'Exception file'.

Comments

No comments to display