Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error() not changing
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00429096
Message ID:
00429715
Vues:
13
I do have an ON ERROR active. It seems when I change the ON ERROR to do something else then ERROR() doesn't work. AERROR does work.

>>Since no one seems to know this answer, I did come up with a solution - AERROR.
>>AERROR has the right error number.
>>
>>I think the cause of the error() not changing is when another ON ERROR is called. Why, I don't know.
>>
>
>From the VFP docs on ERROR()
Remarks
>
>ERROR( ) returns the number of the most recent error. An ON ERROR routine must be active for ERROR( ) to return a value other than 0.
>
>When an error is trapped during program execution, the error type can be returned by ERROR( ) in an ON ERROR routine. The corresponding error message can be returned by MESSAGE( ).
>
>The value ERROR( ) returns is reset by RETURN or RETRY.
>

>>>I am trying to trap the error when opening a table and I have noticed in the debugger that the error() doesn't change if I get an error. I corrupted the index on a table and when I open it I should get a 114 error number. Instead it stays at 0 and my handler doesn't work.
>>>Any ideas?
>>>TIA!
DLC
"Use the Right Tool for the Job!"
davidandcynthia@email.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform