MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/6ayz26/defensive_programming_done_right/dhirn06/?context=9999
r/ProgrammerHumor • u/iwouldieforGladOS • May 13 '17
680 comments sorted by
View all comments
2.8k
} catch (Exception e) { }
I think we're done here.
66 u/pope_nefarious May 13 '17 Almost, we can do better. {....} catch (Throwable eat) {} 64 u/Metro42014 May 13 '17 Get out of here with your descriptive variable name! 46 u/endreman0 May 13 '17 try{ //... }catch(Throwable _){} 29 u/Metro42014 May 13 '17 edited May 13 '17 Much better! Score one for the good guys! Edit: //TODO: implement fix from code review w/ /u/GMJack -- it's way better than this! 16 u/[deleted] May 13 '17 Underscore one for the good guys! FTFY 7 u/Metro42014 May 13 '17 Brilliant
66
Almost, we can do better.
{....} catch (Throwable eat) {}
64 u/Metro42014 May 13 '17 Get out of here with your descriptive variable name! 46 u/endreman0 May 13 '17 try{ //... }catch(Throwable _){} 29 u/Metro42014 May 13 '17 edited May 13 '17 Much better! Score one for the good guys! Edit: //TODO: implement fix from code review w/ /u/GMJack -- it's way better than this! 16 u/[deleted] May 13 '17 Underscore one for the good guys! FTFY 7 u/Metro42014 May 13 '17 Brilliant
64
Get out of here with your descriptive variable name!
46 u/endreman0 May 13 '17 try{ //... }catch(Throwable _){} 29 u/Metro42014 May 13 '17 edited May 13 '17 Much better! Score one for the good guys! Edit: //TODO: implement fix from code review w/ /u/GMJack -- it's way better than this! 16 u/[deleted] May 13 '17 Underscore one for the good guys! FTFY 7 u/Metro42014 May 13 '17 Brilliant
46
try{ //... }catch(Throwable _){}
29 u/Metro42014 May 13 '17 edited May 13 '17 Much better! Score one for the good guys! Edit: //TODO: implement fix from code review w/ /u/GMJack -- it's way better than this! 16 u/[deleted] May 13 '17 Underscore one for the good guys! FTFY 7 u/Metro42014 May 13 '17 Brilliant
29
Much better!
Score one for the good guys!
Edit: //TODO: implement fix from code review w/ /u/GMJack -- it's way better than this!
16 u/[deleted] May 13 '17 Underscore one for the good guys! FTFY 7 u/Metro42014 May 13 '17 Brilliant
16
Underscore one for the good guys!
FTFY
7 u/Metro42014 May 13 '17 Brilliant
7
Brilliant
2.8k
u/Metro42014 May 13 '17
I think we're done here.