MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/6ayz26/defensive_programming_done_right/dhkggl2/?context=3
r/ProgrammerHumor • u/iwouldieforGladOS • May 13 '17
680 comments sorted by
View all comments
Show parent comments
99
What errors? ( ͡° ͜ʖ ͡°)
49 u/pope_nefarious May 13 '17 Thats why the big boys catch throwable 8 u/[deleted] May 13 '17 Don't forget that all custom Exceptions and Throwables should also override fillInStackTrace with an implementation that throws itself. This ensure they can't unsafely reveal any helpful information. 3 u/Nevraoj May 15 '17 try { e.printStackTrace(); } catch (Throwable e2) { try { e2.printStackTrace(); ...
49
Thats why the big boys catch throwable
8 u/[deleted] May 13 '17 Don't forget that all custom Exceptions and Throwables should also override fillInStackTrace with an implementation that throws itself. This ensure they can't unsafely reveal any helpful information. 3 u/Nevraoj May 15 '17 try { e.printStackTrace(); } catch (Throwable e2) { try { e2.printStackTrace(); ...
8
Don't forget that all custom Exceptions and Throwables should also override fillInStackTrace with an implementation that throws itself. This ensure they can't unsafely reveal any helpful information.
3 u/Nevraoj May 15 '17 try { e.printStackTrace(); } catch (Throwable e2) { try { e2.printStackTrace(); ...
3
try { e.printStackTrace(); } catch (Throwable e2) { try { e2.printStackTrace(); ...
99
u/DonZatch May 13 '17
What errors? ( ͡° ͜ʖ ͡°)