Re: (Fwd) [PEAR-DEV] PHP5Beta4: Pear Error class and throwing exce

From: Date: Tue, 24 Feb 2004 02:16:36 +0000
Subject: Re: (Fwd) [PEAR-DEV] PHP5Beta4: Pear Error class and throwing exce
References: 1  Groups: php.pear.qa 
Request: Send a blank email to pear-qa+get-630@lists.php.net to get a copy of this message
As I said on pear-dev, the only real solution is to drop PEAR_ERROR_EXCEPTION altogether. PEAR_Error should not be transitioned to exceptions, I would prefer to see a callback used that repackages PEAR_Error as exceptions, and throws them. User-level, not system-level. It's time to kill PEAR_Error dead for PHP 5. :) Greg Stefan Neufeind wrote:
What might be a possible solution? Deriving Pear_Error from that base- class if PHP5 is used? Or would the error-handling be re-arranged completely? Though I haven't yet worked with PHP5 this might be quite a big problem if I got it right ... Maybe having the PEAR-package include php-version-specific versions of the PEAR-error-class might be a solution? Regards, Stefan ------- Forwarded message follows -------
To:             	pear-dev@lists.php.net
Date sent:      	Sun, 22 Feb 2004 20:06:25 +0100
From:           	Erik Franzén <erik@nordicaudi.com>
Subject:        	[PEAR-DEV] PHP5Beta4: Pear Error class and throwing exceptions
[ Double-click this line for list subscription options ] From PHP5beta4 it is not longer possible to throw a PEAR_Error object as an exception since PHP5 will trigger an error saying that exceptions must be valid objects that are derived from the built in class exception. This means that the PEAR_Error class cannot any longer be thrown as an exception since it is not derived from the built in exception class in PHP5. Any comments on this? /Erik


« previous php.pear.qa (#630) next »