On Wed, 14 Apr 2004, Marcus Boerger wrote:

> > If the developer catches it, they handle it. If they don't, PHP
> > catches it and issues a fatal error.
>
> I am not a friend of PHP catching exceptions and converting them to
> E_ERRORs. Just have an uncaught exception message as we have now.
> And no way of generous catching E_ERRORs by back-door.

This is what I meant. An uncaught exception message is fatal right
now.

PHP Fatal error:  Uncaught exception 'SQLiteException' with message
'SQLiteDatabase::__construct(): unable to open database: /sbin/foo'
in Command line code:1
Stack trace:
#0 {main}
  thrown in Command line code on line 1

This is actually a pretty nasty side effect of throwing exceptions in
ctors because these two lines have *very* different results if they
fail:

$db = new SQLiteDatabase();
$db = sqlite_open();

The first is fatal; the second isn't.

-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