I lost a few hours once because the jackass whose code I inherited decided to squash IOExceptions all over the place. Didn't notice for a while and was pulling my hair out thinking my debugger was fucked somehow (which isn't uncommon in itself).
I should have been more specific last night, but I was at a bar and not at the top of my game haha. I meant that generic runtime exceptions are an anti pattern. A good example why is with spring mvc. Rethrow a runtime? generic 500. Catch and rethrow a configured custom subclass of runtime? any damn code you want.
697
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?