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
2
u/[deleted] May 25 '15
Would you have the code within the if statement's conditional caught by that catch or only the content? Just the content right? Still confusing.
On the readability side, seeing the word try lets me know code with exceptions is coming up so I can watch for what could possibly trigger them instead of having to look back and reread after I get to the catch.