Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Clearing aerror()
Message
From
21/07/2003 12:42:37
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
21/07/2003 12:35:49
Gary Foster
Pointsource Consulting LLC
Chanhassen, Minnesota, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00812050
Message ID:
00812052
Views:
17
>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)
Previous
Reply
Map
View

Click here to load this message in the networking platform