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

-- 
[EMAIL PROTECTED]
author of o'reilly's php cookbook
avoid the holiday rush, buy your copy today!

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to