Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Intercepting errors from an API/Dll
Message
De
04/01/2000 13:35:30
 
 
À
04/01/2000 12:00:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00312450
Message ID:
00312567
Vues:
19
>Hi George,
>
>Thanks for the response. I don't have a problem returning the error message from the .dll. My problem is that it is a fatal error (Zip Code Not Found) or similar. This may be an error I inserted delibrately to test if the .dll would catch it and what message will be displayed. Problem is that I test several 'fatal' errors and I don't want the (I send 15 addresses some with delibrate errors) test program to continue to/thru the last test address.
>
>But the .dll considers this a fatal error and crashes. Suggestions?
>
>Regards,
>
>Paige

Paige- you have to determine what sort of errors are anticipatable, and trap for them specifically. In cases of program errors, (I assume this is a VFP COM server?), you will want to use COMRETURNERROR() to help your server communicate the error and its nature to the client. In the case of anticipatable errors (address not found, etc.), you just need to return a code to the calling program to signify that an error has occurred, and possibly populate a property or properties of the object with details of the error. The calling program should check for exceptions after every call in the loop, and know how to quit or resume if an internal error has occurred.
Erik Moore
Clientelligence
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform