_chainedException = $e; $this->code = $e->getCode(); } parent::__construct($message); } public function hasChainedException() { return ($this->_chainedException!==null); } public function getChainedException() { return $this->_chainedException; } }