Re: Exception misinformation
| From: | David Costa | Date: | Wed, 07 Jul 2004 14:39:05 +0000 |
| Subject: | Re: Exception misinformation | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-31718@lists.php.net to get a copy of this message | ||
On Jul 7, 2004, at 3:18 PM, Hans_L wrote:
Hi Lukas, Lukas Smith wrote:That was exactly my point. I just tried to demonstrate that the argument "we should use exceptions with care because PHP 5 users and developers don't know how to catch them" is flawed. If they don't know how to catch exceptions and they are using PHP 5 they do have a problem. Bertrand was kind enough to illustrate why Wez and PHP core made this choice with the SQLite OO interface and I have very little to add. This was more a practical case, I didn't know how to catch exceptions and I learned once I dealt with the uncaught exceptions fatal error on the Sqlite constructor ;) Regards David CostaThis 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.It sounds like this time you should re-read David's post. His statement was that exceptions are already a part of PHP5 and his example was that SQLite will throw an exception if you try to connect & it fails. Ergo, people using SQLite in PHP5 need to know how to catch exceptions.