Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Triggering errors from inside an FLL library
Message
 
To
26/03/1997 17:07:21
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00025699
Message ID:
00027214
Views:
32
>> 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++.
Previous
Reply
Map
View

Click here to load this message in the networking platform