Comments By: andrezero
-
I would add the fact that PHP throws notices and warnings and errors and exceptions on different situations... apparently it is up to any given php contributor to decide what to throw and when...
posted on Mar 18, 2009 at 8:11am | context
This leaves you with mixed error handling strategies, registering error handlers here, and then another one there, and then your own try {...} catch(){...} blocks for your own code... If I was to decide, php would have a strict mode where every error would be thrown as an exception (possibly involving a couple of different Exception classes).
Then maybe some php.ini conf directive could make it ignore some types of Exceptions so it could run the typical php hacky code.
The try {} finally {} block would be nifty too.
And I could do away with the unrecoverable FATAL errors too. They don't make much sense in a scripting/interpreted environment. Well, they could take an extra check or too within php, possibly a performance cost, sure... well, this way, the extra check or two is in the user space and the performance cost is certainly bigger.
My 2 cents... (man I really need to get my blog back)
