Re: Exception misinformation

From: Date: Wed, 07 Jul 2004 10:04:28 +0000
Subject: Re: Exception misinformation
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-31705@lists.php.net to get a copy of this message
Bertrand Mansion wrote:
Lukas Smith wrote:
David Costa wrote:
Whilst I do appreciate the concern of few developers, I also think that there is not enough clarity on this topic. This is already part of PHP 5, like it or not e.g. Sqlite has an in-build OO interface (not document yet ...:D) e.g. new SQLiteDatabase equals to the procedural function sqlite_open $obj->queryExec(...) is like the procedural function sqlite_exec etc. Well if you do something like $db = new SqliteDatabase ('blah.sqlite'); and the db doesn't exist ...and you don't try and catch you will end up with an uncaught exception that will raise a fatal error.
Interesting you should mention that. For those who read my previous mails they should know that I very much agree that this should throw an exception. However since you are using sqlite as an example. Last time I checked it followed exactly my line of thought. Does it throw an execption if you hav ea malformed query?
Why not ? This looks like a bad example.
hey I wasnt the one who brought up this example! :-) its just that alot of comments on the list go like: its part of php5 so it cant hurt. or look this guy wrote that in his book. or in this case: this extension throws an exception. while its good to learn from how other people do things, they shouldnt be our sole source of inspiration of how we do things. in this particular case the example David brought up it was not even proving the point he was trying to make. regards, Lukas Smith smith@backendmedia.com _______________________________ BackendMedia www.backendmedia.com berlin@backendmedia.com Linn Zwoch Smith GbR Pariser Str. 44 D-10707 Berlin Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07

« previous php.pear.dev (#31705) next »