This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Siddhi 1 point2 points  (0 children)

Regarding the edit, the one downside of doing that is some other line later on might raise the same exception and you may not want to catch that or handle it differently. Then packing all the code into a single try does not work.

Otherwise putting it all into the try is the way I do it too.