I am prototyping on a PHP5 application using PEAR and I ran into a
strange error.
if (PEAR::isError($mReturn)) {
throw $mReturn;
}
PEAR is not configured to return exceptions instead of PEAR Errors and
the above code will generate the following error if $mReturn is a PEAR
Error.
PHP Fatal error: Exceptions must valid objects that are derived from
class Exception in E:\PHPSource\PHPFTP\Source\include\db.inc.php on
line 226
Why must I use the built in exception class? The explantion in release
notes for PHPb4 is that it allows a general catch(Exception $e)
statement to catch all exceptions.
Isn't that up to the developer to deal with it?
/Erik