Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Try..catch singularity
Message
De
30/01/2005 16:21:05
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
00982075
Message ID:
00982113
Vues:
31
>Ciao Fabio,
>
>OK, assuming that the finally doesn't allow the error to surface, I still don't understand why this piece of code enters an infinite loop.
>
>When you run it in the debugger (again, don't try from the IDE), execution will go back to the beginning after catching the error.
>
>Alex
>
>
>>The cause is FINALLY, it hides the endtry error.
>>Without FINALLY,
>>when VFP execute TRY, it check for the ENDTRY;
>>with FINALLY this don't happen.
>>
>>Fabio

Personally I have not had time to inquire on the operation of the VM's PC (program counter) of VFP.

From the first moment, it seems that TRY it creates a nested PC,
ENDTRY update the previous level PC(-1) with the length of the try/endtry block.
Because ENDTRY is not found, it does not update PC(-1), and the VM continue the execution
with the PC value that point to TRY command, then the loop infinite happen.

The mechanism could be various, but sure a PC remains static.

The DEBUGGER it interferes with this mechanism.
In fact the Debugger of VFP is not a probe external debugger,
but it is part of the VM;
therefore the fact that a program functions correctly
in the debugger does not guarantee that functions to runtime.

Fabio
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform