Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I want an error for VFP Open dialog
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00885697
Message ID:
00886004
Views:
24
>Again, it's a feature. If you don't want it to occur, design accordingly.

George, i agree with pretty much everything you say, it's better to code defensivly. But features can be changed, thats why the fox team added try-catch functionnality but to IMO they forgot to include a couple of things in it.

Which of the following would you like better:
try
   Select MyCursor
   Scan
   ....
   EndScan
Catch
   ....
endtry
Or
try
   If Used("MyCursor")
     Select MyCursor
     Scan
     ....
     EndScan
   Else
     Throw "Something"
   Endif
Catch
   ....
endtry
The two method do exactly the same thing but i have 4 more line of code in the second one. Do you like to type for nothing?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform