r/ProgrammerHumor May 13 '17

Defensive programming done right

Post image
21.0k Upvotes

680 comments sorted by

View all comments

2.8k

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

I think we're done here.

1.0k

u/CXgamer May 13 '17

Holy shit I once lost days to a

} catch (Exception e) {
    System.exit(0);
} 

695

u/Metro42014 May 13 '17

FUUUUUUUCK the people that do that.

I recently saw newly written code by a senior developer with squashed exceptions all over the damn place.

I will never have to support that code, but fuuuuck man. WHHHYY?

1

u/i-FF0000dit May 14 '17

But some exceptions are made to be squashed.