Re: Concept: Lightweight error channels
> What's the problem with PHP exceptions? I'm not even trying to argue, I'm
> trying to understand. Is it the implementation (bad/expensive performance)?
> Semantics? Handling syntax?
Larry provided several problems in the opening of his email; you may
want to reread that.
I will affirm that exceptions can be quite expensive. Throwing one
means constructing a backtrace, walking the entire call stack to
gather at minimum function names, file names, and line numbers, and
optionally information about arguments. This is why using them for
errors that are expected to be handled is often considered
inappropriate.
Thread (21 messages)