Re: Exceptions and Errors

From: Date: Mon, 12 Apr 2004 09:05:20 +0000
Subject: Re: Exceptions and Errors
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-9051@lists.php.net to get a copy of this message
At 01:41 AM 4/12/2004 -0400, John Coggeshall wrote:
On Mon, 2004-04-12 at 01:27, Adam Maccabee Trachtenberg wrote: 1) None (almost none?) of the internal classes use exceptions. This makes it difficult (if not impossible) to explain how to use exceptions because you cannot show a meaningful example. As of today, Tidy throws Exceptions in a object context. It's really crazy to need to mix both types of error handling within the same block of code. Completely agree
I agree it's a problem, but as you know, for BC reasons we can't make all internal functions throw exceptions. I do suggest however, that new object oriented extensions throw exceptions in object context. This isn't a BC break and makes sense as it's used in an object-oriented context. In any case, I understand that throwing an exception from user-land error handling works as expected so this can partially solve the problem with internal functions too. Andi

« previous php.internals (#9051) next »