Article ID: 136071
Article Last Modified on 5/7/2003
If a second error occurs in the Error event procedure while it is handling an error, Visual FoxPro calls the ON ERROR routine.
SET PROCEDURE TO SYS(16)
ON ERROR DO procerror
oform1=CREATE('myform')
oform1.SHOW
read events
DEFINE CLASS myform AS FORM
ADD OBJECT cmd1 AS CommandError
ENDDEFINE
DEFINE CLASS CommandError AS COMMANDBUTTON
TOP=5
LEFT=10
WIDTH=50
PROCEDURE CLICK
wiat WINDOW && Error in code. Calls the error event
ENDPROC
PROCEDURE ERROR
PARAMETERS x,Y,z,T
WAIT WINDOW u && Another error. Should call the ON ERROR
ENDPROC
ENDDEFINE
PROCEDURE procerror
WAIT WINDOW "this is an error"
Keywords: kbbug kbdocerr KB136071