Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Stop or return?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Stop or return?
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01159807
Message ID:
01159807
Views:
61
I've got a little function that if it fails I want it to stop and not continue on with the rest of the program. And I'm trying to figure out if "return" is appropriate or a try and catch block. Code:

if sqlrun(lc_cmd) = "Fail"
return
else
anotherfuntion(lcResult)
endif

or

try

sqlrun(lc_cmd)

catch

return

end

anotherfunction(lcReuslt)

Hope this makes sense, thanks in advance.
Next
Reply
Map
View

Click here to load this message in the networking platform