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:
00429471
Vues:
11
>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!
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform