|
Posted by Jason Barnett on 06/28/05 16:37
Kevin L'Huillier wrote:
....
> Create the function split_location to return the associative array or,
> if it is invalid, throws an exception. If PHP4, replace the exception
> with similar error handling.
If efficiency is really the goal, then the OP probably shouldn't go the
route of Exceptions. Just use a simple trigger_error() and your php.ini
to direct where the error messages go. Especially in this case...
because errors here are likely just because someone added / removed an
extra "|" where it didn't belong.
In my opinion you should save exceptions for, well, EXCEPTIONal
problems. Either that or you use exceptions for a large system that
discriminates against specific types of errors and handles each error
type in a totally different way. Can we say bloat?
--
NEW? | http://www.catb.org/~esr/faqs/smart-questions.html
STFA | http://marc.theaimsgroup.com/?l=php-general&w=2
STFM | http://php.net/manual/en/index.php
STFW | http://www.google.com/search?q=php
Navigation:
[Reply to this message]
|