00001 <?php 00026 require_once 'Zend/Db/Exception.php'; 00027 00035 class Zend_Db_Adapter_Exception extends Zend_Db_Exception 00036 { 00037 protected $_chainedException = null; 00038 00039 public function __construct($message = null, Exception $e = null) 00040 { 00041 if ($e) { 00042 $this->_chainedException = $e; 00043 $this->code = $e->getCode(); 00044 } 00045 parent::__construct($message); 00046 } 00047 00048 public function hasChainedException() 00049 { 00050 return ($this->_chainedException!==null); 00051 } 00052 00053 public function getChainedException() 00054 { 00055 return $this->_chainedException; 00056 } 00057 00058 }