svn: /pear2/Exception/trunk/ RELEASE-0.2.0 package.xml package_compatible.xml
[email protected] (Brett Bieber)
| Newsgroups | php.pear.cvs,php.pear.core |
|---|---|
| Message-ID | <[email protected]> |
saltybeagle Sun, 23 May 2010 13:40:54 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=299653
Log:
Document and prep for 0.2.0 release. Ignore .tgz release files.
Changed paths:
_U pear2/Exception/trunk/
U pear2/Exception/trunk/RELEASE-0.2.0
U pear2/Exception/trunk/package.xml
U pear2/Exception/trunk/package_compatible.xml
Property changes on: pear2/Exception/trunk
___________________________________________________________________
Added: svn:ignore
+ *.tar
*.tgz
*.zip
Modified: pear2/Exception/trunk/RELEASE-0.2.0
===================================================================
--- pear2/Exception/trunk/RELEASE-0.2.0 2010-05-23 13:38:42 UTC (rev 299652)
+++ pear2/Exception/trunk/RELEASE-0.2.0 2010-05-23 13:40:54 UTC (rev 299653)
@@ -1,3 +1,4 @@
+- Covert namespace to PEAR2
- Removed getCause() as it just uses the built in getPrevious() that was added in PHP 5.3
- Removed getUniqueId as it's used anywhere
- Removed toHtml, toText and __toString (which only handled calling the former two).
Modified: pear2/Exception/trunk/package.xml
===================================================================
--- pear2/Exception/trunk/package.xml 2010-05-23 13:38:42 UTC (rev 299652)
+++ pear2/Exception/trunk/package.xml 2010-05-23 13:40:54 UTC (rev 299653)
@@ -37,10 +37,10 @@
<email>[email protected]</email>
<active>no</active>
</developer>
- <date>2009-07-07</date>
- <time>22:57:54</time>
+ <date>2010-05-23</date>
+ <time>08:39:48</time>
<version>
- <release>0.1.0</release>
+ <release>0.2.0</release>
<api>0.1.0</api>
</version>
<stability>
@@ -48,7 +48,49 @@
<api>alpha</api>
</stability>
<license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>Initial Release</notes>
+ <notes>- Covert namespace to PEAR2
+- Removed getCause() as it just uses the built in getPrevious() that was added in PHP 5.3
+- Removed getUniqueId as it's used anywhere
+- Removed toHtml, toText and __toString (which only handled calling the former two).
+ People should implement their owny decorator calls.
+- Removed the built in outputs of the observer functions. Those where the class constants
+ OBSERVER_PRINT, OBSERVER_TRIGGER, OBSERVER_DIE
+ This can be achieved by writing a custom callback function, using the appropriate printf(),
+ trigger_error and die() to achieve the same result.
+- Removed getErroClass and getErrorMethod as it can be easily gotten from getTrace/getTraceSafe first array element
+- Add the proper LICENSE file and move Exception.php to the NEW BSD license as the package.xml already defines
+- Removed __toString, toText and toHtml. For those wanting to get pretty outputs they can use this approach:
+
+ $causes = array();
+ $this->getCauseMessage($causes);
+ foreach ($causes as $i => $cause) {
+ var_dump($cause);
+ }
+
+ And combine that with getTraceSafe() or getTraceAsString() if needed.
+
+ Put all that in a function and use set_exception_handler('exceptionHandler'); or similar to process
+ all Exceptions.
+
+ Example code or see the removed code at http://svn.php.net/viewvc/pear2/Exception/trunk/src/Exception.php?r1=295348&r2=295352 :
+
+ function exceptionHandler($e)
+ {
+ if ($e instanceof \PEAR2\Exception) {
+ $causes = array();
+ $e->getCauseMessage($causes);
+ $causeMsg = '';
+ foreach ($causes as $i => $cause) {
+ $causeMsg .= str_repeat(' ', $i) . $cause['class'] . ': '
+ . $cause['message'] . "\n";
+ }
+ echo $causeMsg;
+ } else {
+ echo $e->getMessage(), "\n";
+ }
+ }
+
+ set_exception_handler('exceptionHandler');</notes>
<contents>
<dir name="/">
<dir name="src" baseinstalldir="PEAR2">
Modified: pear2/Exception/trunk/package_compatible.xml
===================================================================
--- pear2/Exception/trunk/package_compatible.xml 2010-05-23 13:38:42 UTC (rev 299652)
+++ pear2/Exception/trunk/package_compatible.xml 2010-05-23 13:40:54 UTC (rev 299653)
@@ -37,10 +37,10 @@
<email>[email protected]</email>
<active>no</active>
</developer>
- <date>2009-07-07</date>
- <time>22:57:54</time>
+ <date>2010-05-23</date>
+ <time>08:39:48</time>
<version>
- <release>0.1.0</release>
+ <release>0.2.0</release>
<api>0.1.0</api>
</version>
<stability>
@@ -48,7 +48,49 @@
<api>alpha</api>
</stability>
<license uri="http://www.opensource.org/licenses/bsd-license.php">New BSD License</license>
- <notes>Initial Release</notes>
+ <notes>- Covert namespace to PEAR2
+- Removed getCause() as it just uses the built in getPrevious() that was added in PHP 5.3
+- Removed getUniqueId as it's used anywhere
+- Removed toHtml, toText and __toString (which only handled calling the former two).
+ People should implement their owny decorator calls.
+- Removed the built in outputs of the observer functions. Those where the class constants
+ OBSERVER_PRINT, OBSERVER_TRIGGER, OBSERVER_DIE
+ This can be achieved by writing a custom callback function, using the appropriate printf(),
+ trigger_error and die() to achieve the same result.
+- Removed getErroClass and getErrorMethod as it can be easily gotten from getTrace/getTraceSafe first array element
+- Add the proper LICENSE file and move Exception.php to the NEW BSD license as the package.xml already defines
+- Removed __toString, toText and toHtml. For those wanting to get pretty outputs they can use this approach:
+
+ $causes = array();
+ $this->getCauseMessage($causes);
+ foreach ($causes as $i => $cause) {
+ var_dump($cause);
+ }
+
+ And combine that with getTraceSafe() or getTraceAsString() if needed.
+
+ Put all that in a function and use set_exception_handler('exceptionHandler'); or similar to process
+ all Exceptions.
+
+ Example code or see the removed code at http://svn.php.net/viewvc/pear2/Exception/trunk/src/Exception.php?r1=295348&r2=295352 :
+
+ function exceptionHandler($e)
+ {
+ if ($e instanceof \PEAR2\Exception) {
+ $causes = array();
+ $e->getCauseMessage($causes);
+ $causeMsg = '';
+ foreach ($causes as $i => $cause) {
+ $causeMsg .= str_repeat(' ', $i) . $cause['class'] . ': '
+ . $cause['message'] . "\n";
+ }
+ echo $causeMsg;
+ } else {
+ echo $e->getMessage(), "\n";
+ }
+ }
+
+ set_exception_handler('exceptionHandler');</notes>
<contents>
<dir name="/">
<file role="php" name="php/PEAR2/Exception.php"/>