Re: PEAR.php to PHP5

From: Date: Sat, 19 Jun 2004 17:06:11 +0000
Subject: Re: PEAR.php to PHP5
References: 1 2 3 4 5 6 7  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-30936@lists.php.net to get a copy of this message
Hans Lellelid wrote:
Note that the point of this is not address any compatibility (which I feel is unnecessary given that php4 packages have to be rewritten anyway), but rather to address missing features of Exception.
By the moment i'm not going to discuss compatibility, will let QA to arraise that point ;)
I think Tobias was right (sorry for arguing, Toby); a PEAR_Exception base class could be quite useful -- as it will add missed features from PEAR_Error and play nice w/ non-PEAR code. This version handles nesting in addition to the observers. (Though I simplified & made all observers callbacks.)
Cool. I've added some stuff: 1) Still like to have some pre-made observers useful for quick debug. Allthought simplified their addition. 2) Added more debuggin info avaible 3) Implemented $exception->toString() (will output HTML if REQUEST_URI is detected). It looks like: PEAR_Exception occurred: Error message: Failed first Error code : 2 File (Line) : /home/cox/www/php5/exceptions-1.php (125)
  Method       : test::first()
Nested Error : test::first()<-test::second()<-test::third() The ball is again in your roof ;) Tomas V.V.Cox

« previous php.pear.dev (#30936) next »