For many developers the answer is:
Asnwer: You gotta catch 'em all.
I saw this other blog post on "Dodgy Coder" and was greatly amused by the comparison of Pokemon and catching all exceptions and basically making them disappear.
I've written about this "worst" practice a lot. You can see some of them at:
- http://tkyte.blogspot.com/2007/03/dreaded-others-then-null-strikes-again.html
- http://tkyte.blogspot.com/2008/06/when-others-then-null-redux.html
- http://www.oracle.com/technetwork/issue-archive/2007/07-jul/o47asktom-092692.html
- http://www.oracle.com/technetwork/issue-archive/2011/11-nov/o61asktom-512015.html (why you really want to let exceptions propagate)
You really DON'T gotta catch em' all! And if you do - you really gotta throw them again (re-raise them)
ICT4PE&D
No comments:
Post a Comment
Thank's!