qaz@lemmy.world to Programmer Humor@programming.devEnglish · edit-21 day agoSlapping on a .expect is also error handling!lemmy.worldimagemessage-square26fedilinkarrow-up1161arrow-down15file-text
arrow-up1156arrow-down1imageSlapping on a .expect is also error handling!lemmy.worldqaz@lemmy.world to Programmer Humor@programming.devEnglish · edit-21 day agomessage-square26fedilinkfile-text
minus-squarejubilationtcornpone@sh.itjust.workslinkfedilinkarrow-up13·1 day agotry { execute.SomeMethod(); } catch(Exception ex) {}
minus-squarer00ty@kbin.lifelinkfedilinkarrow-up1·10 hours agoI’ve seen this in production code before. I might argue if you caught a very specific exception type that didn’t matter it might be acceptable. Maybe. But just the overall Exception type… Recipe for disaster.
try { execute.SomeMethod(); } catch(Exception ex) {}
I’ve seen this in production code before. I might argue if you caught a very specific exception type that didn’t matter it might be acceptable. Maybe. But just the overall Exception type… Recipe for disaster.
goto fail;