Exceptional rule of thumb by ThinqLinq

Exceptional rule of thumb

I can't remember where I initially saw it, but the best advice I've seen for when to use exceptions is as follows:

"Don't pee your pants in order to see if your fly is unzipped."

You should always check to see that you are in a valid state before proceeding rather than throwing a likely exception.

Posted on - Comment
Categories:
comments powered by Disqus