Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can you reproduce this error?
Message
From
17/01/2000 13:03:55
Kenneth Downs
Secure Data Software, Inc.
New York, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Can you reproduce this error?
Miscellaneous
Thread ID:
00319082
Message ID:
00319082
Views:
57
Folks,

I lost a half-hour or so today before determining that Visual Foxpro is failing to trap a certain error. Specifically, if you attempt to copy file1 to file2, while file2 is open, the user gets the error, not the error trapper.

Following is code to reproduce. Does anyone else get the same result?

Special: Two points to the person who comes up with the most creative doublespeak explaining why this is not a bug, but a feature.

CODE BEGINS HERE:
*
*  FAILED ON ERROR COMMAND
*  by Kenneth Downs
*  ken.downs@msginet.com
*
CLOSE ALL

*  Get a table open under
*  an alias different from
*  its Stem
*
CREATE TABLE NoError1 (Field1 C(5))
USE
USE NoError1 ALIAS IAmNoError1

*  Get another table open
*  
SELE 0
CREATE TABLE NoError2 (Field1 C(5))

*  Create a simple flag that
*  will go to -1 if the
*  command fails on an error
*
LOCAL lnError,lcError
lcError = ON("ERROR")
ON ERROR lnError = -1
lnError = 0

*  Attempt to copy the 2nd table
*  to the first, triggering
*  an error, which does NOT
*  get triggered
*
SELE NoError2
COPY TO NoError1
Next
Reply
Map
View

Click here to load this message in the networking platform