Re: exceptions instead of errors
| From: | Alan Knowles | Date: | Tue, 13 May 2003 09:05:29 +0000 |
| Subject: | Re: exceptions instead of errors | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-1470@lists.php.net to get a copy of this message | ||
A very difficult problem with very little in the way of clean solutions..
my only thought was:
mysql::connect() would thrown an exception
mysql_connect() would emit an error..
basically all 'object methods - static or dynamic' would be expected to throw errors, where as functions would just emit errors.
so you could implement object wrappers for key 'exception em
It's far from a complete solution. (downside is the extra documentaiton overhead of this..)
Regards
Alan
Then pick some other way you like, there're surely several ways to reach the same ends. It's just an example of the kind of thing that would solve that problem without creating new problems. Personally, I'd say use new function names for exception-throwing versions of old functions, or stick exception-throwing wrappers in PEAR.-- Can you help out? Need Consulting Services or Know of a Job? http://www.akbkhome.com