Re: PHP5Beta4: Pear Error class and throwing exceptions

From: Date: Tue, 24 Feb 2004 02:05:32 +0000
Subject: Re: PHP5Beta4: Pear Error class and throwing exceptions
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-25837@lists.php.net to get a copy of this message
I have a comment. It's time to put PEAR_Error in the trash where it belongs. In the mean time, it is simple to create a new Exception with all the information of a PEAR_Error, but I believe strongly that the PEAR_ERROR_EXCEPTION mode is a hack that should be killed before it goes into general usage. As classes go PHP5-only, they should abandon PEAR_Error permanently. Greg Erik franzén wrote:
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.dev (#25837) next »