Skip to content

Are they not Same ??? #2525

Answered by krakxn
OmarWaqar123 asked this question in Q&A
Discussion options

You must be logged in to vote

You certainly can omit the try-catch, but it is important to note that we do so as it adds an extra layer of precaution--and also makes it easier to debug in a large codebase--to catch any errors whatsoever in evaluating the statements inside the try block.

Thus, the reasons above are what makes the former different from the one you specified; the functionality is identical.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by OmarWaqar123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants