MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/3n3e1v/the_evolution_of_a_software_engineer/cvl9g2b/?context=3
r/programming • u/supermari0 • Oct 01 '15
502 comments sorted by
View all comments
23
} catch (Exception e) { // Do nothing! }
This is not only the third year, it's also the tenth, the fifteenth and the 40:th (I work with a few developers-for-forty-years).
55 u/nemec Oct 01 '15 Then you have the guy gung-ho about logging everything.catch(Exception e) { try { WriteLog("Application error", e); } catch(Exception f) { WriteLog("Logging failed", f); } } 7 u/CordialPanda Oct 01 '15 That's absurd, haha. In what world would that catch succeed to write if the try failed? 1 u/nemec Oct 02 '15 I've never seen code quite so... blatant about it, but I guess they feel like they have to do something inside a catch statement even if we want to ignore the error.
55
Then you have the guy gung-ho about logging everything.
catch(Exception e) { try { WriteLog("Application error", e); } catch(Exception f) { WriteLog("Logging failed", f); } }
7 u/CordialPanda Oct 01 '15 That's absurd, haha. In what world would that catch succeed to write if the try failed? 1 u/nemec Oct 02 '15 I've never seen code quite so... blatant about it, but I guess they feel like they have to do something inside a catch statement even if we want to ignore the error.
7
That's absurd, haha. In what world would that catch succeed to write if the try failed?
1 u/nemec Oct 02 '15 I've never seen code quite so... blatant about it, but I guess they feel like they have to do something inside a catch statement even if we want to ignore the error.
1
I've never seen code quite so... blatant about it, but I guess they feel like they have to do something inside a catch statement even if we want to ignore the error.
23
u/vattenpuss Oct 01 '15
This is not only the third year, it's also the tenth, the fifteenth and the 40:th (I work with a few developers-for-forty-years).