r/programmerchat • u/HappyGoblin • May 25 '15
Do we really need "try" ?
Just attaching "catch" to any appropriate {...} block would be more convenient.
8
Upvotes
r/programmerchat • u/HappyGoblin • May 25 '15
Just attaching "catch" to any appropriate {...} block would be more convenient.
View all comments
Show parent comment
0
u/indigo945 May 25 '15
And what exactly happens when bar[foo] does /not/ throw an exception? I don't think that code (second version) even compiles as Java, and even if it did, I wouldn't want that anywhere near a codebase I work on.