Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Clearing aerror()
Message
De
21/07/2003 12:42:37
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
21/07/2003 12:35:49
Gary Foster
Pointsource Consulting LLC
Chanhassen, Minnesota, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00812050
Message ID:
00812052
Vues:
18
>Does anyone know how to clear whatever buffer aerror() is reading? I want to trap an error at a specific place and get the info with aerror(), but if there was an earlier error generated somewhere, I can't test for it anywhere later since aerror() will fill an array with the previous error info.
>
>Gary

You can put it to a certain value, with the ERROR command.

However, I never saw the need to do this. I only tested aerror() if an error occured - not if the array had error information.

For instance:
if not TableUpdate()
  aerror(MyErrorArray)
  MessageBox(trans(MyErrorArray(1)) + " - " + MyErrorArray(2))
endif
Or:
on error llError = .T.
* Try something risky here
on error
if llError
  aerror(MyErrorArray)
  ...
endif
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform