Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error handler to stop a procedure?
Message
From
15/07/1999 08:39:44
 
 
To
14/07/1999 14:01:40
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00241384
Message ID:
00241719
Views:
10
I dooubt that the error procedure that is called is the Error() event of the form, because the line should read ON ERROR THISFORM.Error(). I've just tested it with your ON ERROR line and it bomb out, telling me that it couldn't find Error.PRG

I've notice also that the Error() event of the form isn't triggered if the error is inside a command button. It seem that the command button Error() event is fired first, then then ON ERROR take place, ignoring the form Error() event.

In my test, I've place the following line in the Click() event of the command button: a = "a" + 1

In the command button Error() event, I've put:
MessageBox("Error")
THISFORM.Release()

When running my form, I get the message box and the form close correcly.

I suggest that you trace your code to see exactly what method are called and see if your error handler is outside the form.

>That didn't release the active form though. Besides, I think 'THISFORM.RELEASE' is in the form because it is in the 'ERROR' event.
Previous
Reply
Map
View

Click here to load this message in the networking platform