Hacker News new | past | comments | ask | show | jobs | submit login
Bad programming with exception (badprogramming.com)
2 points by SteveOS on Oct 7, 2009 | hide | past | favorite | 1 comment



A lot of applications that I have worked on (primarily written in PHP) use Exceptions in a fashion similar to what has been shown in the example. And, I have seen places in code where exceptions get thrown when there is no data in a given table instead of returning zero or null. But, the I wouldn't be totally against using Exceptions in the example on that page if the calling method does something very important. I would love other's views on this.

Also, I was able vote multiple times for the same example (went from -3 to 3).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: