_previous = $previous; } /** * Returns previous Exception * * @return Exception|null */ final public function getPrevious() { return $this->_previous; } /** * String representation of the exception * * @return string */ public function __toString() { if (null !== ($e = $this->getPrevious())) { return $e->__toString() . "\n\nNext " . parent::__toString(); } return parent::__toString(); } } } else { /** * @category Zend * @package Zend * @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_Exception extends Exception { public function __construct($msg = '', $code = 0, Exception $previous = null) { if (!is_int($code)) { $code = (int) $code; } parent::__construct($msg, $code, $previous); } } }