Exceptions

Up until this point, we've done what every programmer does at one point in their career; write code and assume that everything will work correctly. After all, if we are finished with our code, there won't be any errors, right? (I mean it's PHP it didn't report any errors, how could anything go wrong?) However, every programmer eventually learns the truth and the good ones take the lesson to heart and learn to handle the problems programmatically instead of just barfing bits on the screen and assuming the user knows what to do. Zend Framework handles problems via exceptions.

Note, if you are already familiar with the concepts encapsulated by exceptions and aren't interested in lame sports analogies, skip this section.

Was this article helpful?

0 0

Post a comment