Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Errors only when error handler is active.
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00298769
Message ID:
00299439
Views:
21
I realize that the error is 1707. Later I found that stepping through the code caused it to come back with error 0. This specific issue was easy enough to fix, but I am concerned that there is code that will run under the default error handling, but not with a error handling routine. I prefer the default error handler during development. Here is an example:

** This works
ON ERROR
CREATE TABLE myTable (Field1 n(1))
INDEX ON field1 TAG field1
USE
ERASE FULLPATH('myTable.cdx')
USE myTable

** This errors
ON ERROR WAIT WIND TRAN(ERROR())
CREATE TABLE myTable (Field1 n(1))
INDEX ON field1 TAG field1
USE
ERASE FULLPATH('myTable.cdx')
USE myTable

I would not realize this is a problem using the default error handler. Yes I handle 1707 in my error handler by retrying the last command. That would work in this simple case, but not in others. What other errors behave like this?

Thanks for your help.

Marcus.

>'Structural .CDX file is not found' is error 1707.
>
>For this error, if there isn't a error handler (on error), this is the normal behavior.
>
>Why isn't the .cdx for id.dbf available?
>
>>I have a routine that only errors when error my error handler is active. The line of code is an append statement:
>>
>>SELECT update
>>APPEND FROM id.dbf && this line errors
>>
>>When there is no error handler there is no problem. However when I have an error handler active:
>>
>>ON ERROR DO errorhan with ERROR(),MESSAGE(),MESSAGE(1),SYS(16),LINENO()
>>
>>When tracing the code, error() returns 0, but the MESSAGE() returns 'structual CDX not found'. How can error() be 0, and trigger the error handler? How come it wouldn't fire the default VFP error routine when I don't have my error handler active? This is driving me a little nuts. You help is appreciated.
>>
>>Marcus.
Previous
Reply
Map
View

Click here to load this message in the networking platform