4 ms·
Let's be really honest try { theUpdatedFunction(); } catch (MyNewCheckedException e) { logger.warn("Whoopsie doopsie", e); throw new SomeUnchec
by hinkley 3y ago
Let's be really honest
try {
theUpdatedFunction();
} catch (MyNewCheckedException e) {
logger.warn("Whoopsie doopsie", e);
throw new SomeUncheckedException(e.message);
}
There's a special place in Hell for these people, but at least they'll get to see all of their friends again.
- mdaniel 3y agoOooo, lookit you working with professionals; I've seen waaaaaaay too many instances of this shit try { somethingImportant(); } catch (Exception e) { // can't happen } IJ finally started chirping about this other anti-pattern try { doit(); } catch (Exception e) { System.err.println("something didn't work"); // failure to reference "e" is now a yellowbox } I have to constantly ask for them to either log it, or rename the variable to `ignored` to get IJ and future readers on the same page that it was intentionally swallowed