Re: exceptions

From: Date: Tue, 08 Jun 2004 21:54:04 +0000
Subject: Re: exceptions
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-30230@lists.php.net to get a copy of this message
Greg Beaver wrote: >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. Can't we just get rid of PEAR_Error and use exceptions instead ? Bertrand Mansion Mamasam

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