Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using `RETURN TO`.. unusual error thrown
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Using `RETURN TO`.. unusual error thrown
Divers
Thread ID:
01057523
Message ID:
01057523
Vues:
52
This is an interesting scenario that I cannot figure out:

I have a COM DLL that has an OLEpublic class with a method that calls an external procedure like this:
procedure myMethod
Do ExternalProc 
Return
EndProc
ExternalProc does a lot of stuff and calls other routines that go several routines deep. At certain points within those routines, there is a need to unwind and exit. So I tried this:
Return to myMethod
Now, this seems to execute OK. But then upon execution of the Return statement within myMethod, I get the following error (which my ERROR routine in the class picks up and reports):
Error No: 2059
Procedure/Method: myMethod
Message: Unhandled Structured Exception.

Can somebody tell me why this is happening? If this is stupid way of accomplishing what I'm after (i.e., unwinding the VFP procedure stack and returning immediately to the user of the COM object, which happens to be an ASP page) please let me know the right way to accomplish the same objective. Simply using a bunch of cascading RETURN statements driven by some kind of status checking is pretty inefficient here. I found that using "CANCEL" just causes an error on the ASP page. Thanks very much.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform