[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 71
  • Last Modified:

return in catch statement

Hi,

When we use return in catch statement. I never used return in catch statement myself but saw a code like that. Wondering why we use return in catch block after some system out statement giving user instructing t enter proper values? please advise
0
gudii9
Asked:
gudii9
1 Solution
 
CPColinCommented:
You've asked a very similar question to this one before. You would use a return statement in a catch block if you want to return from your method at that point in your code, same as using a return statement in any other block. There's really not much more to it than that.
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now