>> Do you know of a way to get a listing of internal error codes???
>
>if I remember correctly the error code returned by other VFP API calls work ok
When a VFP API call bombs there is not problem (I just do _Error(-x); where x is the return value). I'm interested in generating errors myself (e.g. when I allocate memory and there is a failure) and there seems to be no listing of VFP internal errors.
>(but I guess these are already "internal codes")
>btw I just checked and _Error() documentation does erfer you the numeric list of VFP
>error codes
>I'll test that if I'll have the time
>btw what is error 631?
>
> I would expect _Error(631) to generate error 1941 - error code not valid (s)
>
>did you check that with valid error codes?
>
>> For example using doing
>> _Error(631);
>> actually generates foxpro error code 230....
>>
I found this error code in the FoxTLib example (also found in Chapter 28 of the foxpro Developers Guide)
I have found a work around piece of code if you are interested
void ExternalError(int error) {
     char buff[80];
     sprintf(buff, "error %d", error);
     _Error(_Execute(buff));
}
This code can support parameterized errors and user defined errors with little change...
Thanks for your help,
Peter
Peter Stephens
Visual Records, Inc.
Lead Programmer for the general purpose record keeping system Visual Records. Written primarily in VFP 6.0 with a little C++.