Revision: 96
http://sourceforge.net/p/beeframework/code/96
Author: m_plomer
Date: 2013-09-30 16:41:22 +0000 (Mon, 30 Sep 2013)
Log Message:
-----------
- adapted Bee_Exception_Base to the Exception hierarchy of PHP 5.3 (and deprecated it in the process)
Modified Paths:
--------------
trunk/framework/Bee/Exceptions/Base.php
Modified: trunk/framework/Bee/Exceptions/Base.php
===================================================================
--- trunk/framework/Bee/Exceptions/Base.php 2013-09-25 23:33:37 UTC (rev 95)
+++ trunk/framework/Bee/Exceptions/Base.php 2013-09-30 16:41:22 UTC (rev 96)
@@ -17,29 +17,24 @@
/**
* Base class for framework exception hierarchies. Adds support for root causes (i.e. Exceptions, as a result
- * of which this exception has been thrown).
+ * of which this exception has been thrown).
+ *
+ * @deprecated base the Bee Exception hierarchy on the regular PHP exception (which has a "previous" property starting
+ * with PHP 5.3.0)
*/
class Bee_Exceptions_Base extends Exception {
- /**
- * Enter description here...
- *
- * @var Exception
- */
- private $cause;
-
public function __construct($message, Exception $cause = null) {
- parent::__construct($message);
- $this->cause = $cause;
+ parent::__construct($message, 0, $cause);
}
/**
* Enter description here...
*
+ * for backward-compatibility...
* @return Exception
*/
public final function getCause() {
- return $this->cause;
+ return $this->getPrevious();
}
-}
-?>
\ No newline at end of file
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|