> > >> Warnings are special, they aren't really errors as such. They wouldn't > become exceptions. > > Also, why should an erroring function return a value? > > from "My experience shows it's best to have an error handler convert all errors to catchable exceptions, with some error types (like E_STRICT, E_ERROR etc.) to become instant fatal errors (can't be caught)." I think he is talking about turning everything(E_NOTICE, E_WARNING, etc.) into exceptions except a few, which can't be catched (why should E_STRICT be uncatchable?! ). Which brings up the issues that I mentioned before. Getting the return of an erroring function isn't such a big issue, but turning everything into exceptions would prevent getting any return value from any function/operation which triggers anything,
Personally I think that turning everything into exceptions is a bad idea, and it would make stuff which possible currently impossible. On the other hand, I think that we have many E_ERROR which could be turned into E_RECOVERABLE_ERROR. Which in turn could be turned into Exception by an userland error handler if the php userland developer wishes it. -- Ferenc Kovács @Tyr43l - http://tyrael.hu