Do NOT throw exceptions if you can avoid it!

“Do NOT throw exceptions if you can avoid it, it makes your code MUCH slower, if you feel like throwing something and then catching it – go play ball with your dog. If you don’t have a dog get one – they’re awesome!”
First, get a cat. Cats are way more cool.”

just for fun

I was work for one company, the best project what company develop and support in 70% throw stupid exception and catch it in another class. Even in one method 3-4 different user exceptions, like “if not found generate exceptions”, also one findAll method has 3-4 unit tests, and every method like getUserCount() has comment /** this is a user count */.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s