equal
deleted
inserted
replaced
12 * obtain it through the world-wide-web, please send an email |
12 * obtain it through the world-wide-web, please send an email |
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend |
16 * @package Zend |
17 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
17 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @license http://framework.zend.com/license/new-bsd New BSD License |
18 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @version $Id: Exception.php 20978 2010-02-08 15:35:25Z matthew $ |
19 * @version $Id: Exception.php 24593 2012-01-05 20:35:02Z matthew $ |
20 */ |
20 */ |
21 |
21 |
22 /** |
22 /** |
23 * @category Zend |
23 * @category Zend |
24 * @package Zend |
24 * @package Zend |
25 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
25 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
26 * @license http://framework.zend.com/license/new-bsd New BSD License |
26 * @license http://framework.zend.com/license/new-bsd New BSD License |
27 */ |
27 */ |
28 class Zend_Exception extends Exception |
28 class Zend_Exception extends Exception |
29 { |
29 { |
30 /** |
30 /** |
52 |
52 |
53 /** |
53 /** |
54 * Overloading |
54 * Overloading |
55 * |
55 * |
56 * For PHP < 5.3.0, provides access to the getPrevious() method. |
56 * For PHP < 5.3.0, provides access to the getPrevious() method. |
57 * |
57 * |
58 * @param string $method |
58 * @param string $method |
59 * @param array $args |
59 * @param array $args |
60 * @return mixed |
60 * @return mixed |
61 */ |
61 */ |
62 public function __call($method, array $args) |
62 public function __call($method, array $args) |
63 { |
63 { |
64 if ('getprevious' == strtolower($method)) { |
64 if ('getprevious' == strtolower($method)) { |
74 */ |
74 */ |
75 public function __toString() |
75 public function __toString() |
76 { |
76 { |
77 if (version_compare(PHP_VERSION, '5.3.0', '<')) { |
77 if (version_compare(PHP_VERSION, '5.3.0', '<')) { |
78 if (null !== ($e = $this->getPrevious())) { |
78 if (null !== ($e = $this->getPrevious())) { |
79 return $e->__toString() |
79 return $e->__toString() |
80 . "\n\nNext " |
80 . "\n\nNext " |
81 . parent::__toString(); |
81 . parent::__toString(); |
82 } |
82 } |
83 } |
83 } |
84 return parent::__toString(); |
84 return parent::__toString(); |
85 } |
85 } |