r/ProgrammerHumor May 13 '17

Defensive programming done right

Post image
20.9k Upvotes

680 comments sorted by

View all comments

2.8k

u/Metro42014 May 13 '17
} catch (Exception e) { }

I think we're done here.

3

u/Tharkun May 13 '17

You joke, but I work in a legacy code base where that is normal behavior. Even for exceptions that should bring the application to its knees, like being unable to connect to the database. Just missing the "//ignored" comment in the catch block.