Re: What do you think which mode will be standard for PEAR Error handling in PHP5?
| From: | Jackson Miller | Date: | Wed, 03 Dec 2003 15:00:04 +0000 |
| Subject: | Re: What do you think which mode will be standard for PEAR Error handling in PHP5? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-9272@lists.php.net to get a copy of this message | ||
On Tuesday 02 December 2003 2:51, Erik Franzén wrote:
> When using PEAR with PHP5 it is possible to set setErrorHandling() to
> PEAR_ERROR_EXCEPTION which will make PEAR throw exceptios instead of
> PEAR_Error objects.
>
> In the future, do you think this will be the standard mode for PEAR
> error handling?
It seems to me that exceptions are really the way to go, but I have only heard
the argument FOR exceptopns. However, if exceptions become the PEAR
standard, then we wouldn't really need PEAR_Error (which was probably just
filling a viod that has now been filled by PHP5).
The only downside I can think of is how to get the same functionality as:
if (PEAR::isError($class->method()) {
// do something
}
If there is a way to have an isException method then the only problem is
backward compatibility (which can probably be handled with callbacks).
Any other thoughts?
-Jackson
>
> /Erik