Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Active Datasessions in the Call Stack?
Message
De
21/02/2009 09:14:01
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
20/02/2009 16:13:32
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01383185
Message ID:
01383255
Vues:
40
>Is there a way to know what datasession is active for each line #/program level in the call stack?
>Meaning, let's say I have the following call stack:
>
>CALL STACK
>///////////////////////////////////////////////
>
>6 MyGlobalErrorObject.HANDLE_ERROR
>
>5 MyGlobalErrorObject.ERROR
>
>4 SomeForm.Button.ERROR
>
>3 SomeForm.Button.CLICK
>
>2 MyApp.ReadEvents
>
>1 MAIN.PRG
>
>In the error handler HANDLE_ERROR method (program level 6 in this example), is there any way to know what datasession is/was active when the error condition in program level 3 occurred?
>
>What I would like to do in the error handler is switch to the datasession the error occurred in and gather state on open tables/views/record pointers etc...

From what I see in my errorlogs, the on("error") code executes in the datasession in which the error happened, and it's a global handler object just like the one you have.

Not sure, but maybe the debugger knows. I know it shows datasessions switching as the code executes, but if in the call stack you go a few levels back, it should show all the variables and fields as they were... so maybe it switches the DS maybe not. Don't have a ready example at hand, and am too fuzzy with flu to build one - and you seem to have one at hand, so just add a watch on SET("Datasession") in your debugger and see whether it works.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform