Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9075 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 70523 invoked by uid 1010); 12 Apr 2004 17:05:19 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 70421 invoked from network); 12 Apr 2004 17:05:18 -0000 Received: from unknown (HELO miranda.org) (209.58.150.153) by pb1.pair.com with SMTP; 12 Apr 2004 17:05:18 -0000 Received: (qmail 12384 invoked by uid 546); 12 Apr 2004 17:05:18 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 12 Apr 2004 17:05:18 -0000 Date: Mon, 12 Apr 2004 13:05:18 -0400 (EDT) X-X-Sender: adam@miranda.org To: Greg Beaver cc: Ilia Alshanetsky , internals@lists.php.net In-Reply-To: <407AC236.5030506@chiaraquartet.net> Message-ID: References: <1081740243.14476.11.camel@coogle.localdomain> <200404120855.02983.ilia@prohost.org> <200404121109.44904.ilia@prohost.org> <407AC236.5030506@chiaraquartet.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [PHP-DEV] Exceptions and Errors From: adam@trachtenberg.com (Adam Maccabee Trachtenberg) On Mon, 12 Apr 2004, Greg Beaver wrote: > Adam Maccabee Trachtenberg wrote: > > > I am willing to concede that SQL parse errors aren't the best example > > here, but that doesn't mean extensions should never throw exceptions. > > If a user has written code expecting it to work in PHP 4 and PHP 5 with > a registered error handler, it has to be completely rewritten. If you're expecting this code to work in both PHP 4 and PHP 5, you're not using the OO extension interface, so no exceptions will be thrown. Things will work just like before. I also presume that exceptions are not handled by a registed error handler. That would be madness. :) I think by now I am resigned to the situation that PHP's internal error reporting system doesn't doesn't map well to exception handling. This problem is at least somewhat related to inconsistent application of E_WARNINGs, E_ERRORs, etc. Certain extensions (SOAP, Ming) love to throw E_ERRORs. Others won't throw an E_ERROR in even the worst of circumstances. Therefore, sometimes E_WARNINGs are harmless and other times they're fatal. Oh well. -adam -- adam@trachtenberg.com author of o'reilly's php cookbook avoid the holiday rush, buy your copy today!