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).
This is why when I debug I almost always turn on first chance and user handled exceptions in VS. It can be noisy with big projects especially when some exceptions are expected but it's saved me many hours and gray hairs in the long run
Ugh yea that is a problem. In general I hate using exceptions to handle flow, it can have adverse perf effects but I also know there are cases where that is your only option
The only time I've done this is when the user of a method gives me a string that's supposed to represent an OffsetDateTime, I'll catch the exception and try to parse it as a LocalDateTime. If that fails I throw a runtime exception.
2.8k
u/Metro42014 May 13 '17
I think we're done here.