diff options
Diffstat (limited to 'libs/Zend/Db/Adapter/Exception.php')
-rw-r--r-- | libs/Zend/Db/Adapter/Exception.php | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/libs/Zend/Db/Adapter/Exception.php b/libs/Zend/Db/Adapter/Exception.php index 51c06874a6..2510ef6526 100644 --- a/libs/Zend/Db/Adapter/Exception.php +++ b/libs/Zend/Db/Adapter/Exception.php @@ -15,44 +15,43 @@ * @category Zend * @package Zend_Db * @subpackage Adapter - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License - * @version $Id: Exception.php 17860 2009-08-27 22:48:48Z beberlei $ + * @version $Id: Exception.php 20096 2010-01-06 02:05:09Z bkarwin $ */ /** * Zend_Db_Exception */ -require_once 'Zend/Db/Exception.php'; +// require_once 'Zend/Db/Exception.php'; /** * @category Zend * @package Zend_Db * @subpackage Adapter - * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com) + * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Db_Adapter_Exception extends Zend_Db_Exception { protected $_chainedException = null; - public function __construct($message = null, Exception $e = null) + public function __construct($message = '', $code = 0, Exception $e = null) { - if ($e) { - $this->_chainedException = $e; - $this->code = $e->getCode(); + if ($e && (0 === $code)) { + $code = $e->getCode(); } - parent::__construct($message); + parent::__construct($message, $code, $e); } public function hasChainedException() { - return ($this->_chainedException!==null); + return ($this->_previous !== null); } public function getChainedException() { - return $this->_chainedException; + return $this->getPrevious(); } } |