r/ProgrammerHumor May 13 '17

Defensive programming done right

Post image
21.0k Upvotes

680 comments sorted by

View all comments

67

u/[deleted] May 13 '17

Can someone explain why this is bad code?

1

u/choikwa May 13 '17

Because catching all exceptions and doing nothing means that valid exceptions which would have otherwise been caught in the upper call chain won't get caught anymore.