Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
[VFP7](Re)setting/not using the AERROR() array
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00781438
Message ID:
00781574
Vues:
22
>Situation:
>An error handler that looks at the number of errors returned by the AERROR() function. (if > 0 continue; else return)
>This handler is explicitly called, and is not in the 'ON ERROR'-handler.
>
>Problem:
>I want to be 'dirty' and ignoring any errors that might occur (I don't want any error messages), so I use the following code:
>
>
>cOldErr = ON( 'ERROR' )
>ON ERROR *
>GO nRecno IN (cAlias)
>ON ERROR &cOldErr
>
>
>After this, the error-function is called, and it fires with the message: 'Record is out of range'.
>The AERROR() returns this error.
>This message is a result from the GO nRecno ... command.
>
>How can I clear/not use/overwrite ('not use' preferably, because before the specific code an error occurs which I want to see in my message) the error array?

You might be able to get away with "clearing" the error by generating one of your own:
ERROR "My Error"
This form of the error command will generate an error 1098 with "My Error" as the text. At least that way you could tell if any other code has generated an error after you've "reset" the error to this state.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform