Re: Exceptions and Errors
| From: | Jani Taskinen | Date: | Wed, 14 Apr 2004 01:35:23 +0000 |
| Subject: | Re: Exceptions and Errors | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-9136@lists.php.net to get a copy of this message | ||
On Wed, 14 Apr 2004, Marcus Boerger wrote:
>> 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.
So to use the OO API of sqlite requires that I use
exceptions with it too..? It's pretty unfriendly to force
the use of exceptions like this, IMO.
--Jani