Re: exceptions

From: Date: Tue, 08 Jun 2004 21:14:06 +0000
Subject: Re: exceptions
References: 1 2 3 4 5 6 7 8 9  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-30224@lists.php.net to get a copy of this message
Justin Patrin wrote:
PEAR_Error extends Exception The PEAR_Error could be thrown *as it is* without having to convert between it and some PEAR_Exception. If this is impossible (or hard to do) please tell me. I haven't done any exception handling in PHP yet as I am forced to stick with stable (and mature) versions of PHP for my work.
PEAR_Error already extends PEAR. Incidentally, these questions you are raising are all very good, and have been raised before on the list. PEAR_Error is in fact obsolete. Its primary features have been superseded by far superior exceptions and PEAR_ErrorStack. PEAR_ErrorStack can handle PEAR_Errors and convert them into any format you desire, including exceptions, so it acts as a bridge between old code and new code. Others are welcome to continue using PEAR_Error as is, but it will not be further bloated with new features/hacks. Greg

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