Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error handler
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00458265
Message ID:
00458322
Views:
17
>>1. the question was about the Error Event,
>> which is distinct from the ON ERROR mechanism
>>
>>2. you left out the proper arguments in your ON ERROR command example
>>
>>It should read:
>>
>>ON ERROR do ERRHAND with error(), mess(), mess(1), prog(), lineno()
>>
>>Mike
>Your right, I pasted from the the ERRHAND procedure and not the ERROR EVENT pointer.
>Is an error event anything that triggers an ON ERROR call? Different controls (those with error events) may have different names for the parameters. Are you trapping an error in code or are you talking about a specific control?

Terry,

In VFP one needs to be careful about using the phrase "error event" as a generic term, because this is likely to be confused with VFP's Error Event method. An error triggers either an Error Event method, or an ON ERROR handler, or VFP's default error handler. I think John's original question was referring to the standard nLine argument that applies to all Error Event methods. There is no absolute standard, however, as to the arguments passed to an ON ERROR handler - you just have to be consistent about it. Typically you would want to pass at least the line # argument to an ON ERROR handler, because this is the one value that CAN'T determined by the ON ERROR handler itself. (If you try to obtain lineno() in the handler procedure, you'll get the line # within the handler, not the one where the error occurred.)

Mike
Montage

"Free at last..."
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform