drosenkranz
Programmer
I have an error handling procedure stored in a prg with a bunch of other procedures. I have an On ERROR DO MyErrProc in a form's command button. The procedure runs correctly and displays the messages I want. I need advice on options in program control upon return to the code that originally caused the error.
Is there a way to tell if an error has occurred once you RETURN from the err handling procedure?
All I can think of seams lame:
ON ERROR DO MyErrProc
Public gl_Did_Error_Occur
gl_Did_Error_Occur = .F.
Then I place a line of code setting gl_Did_Error_Occur = .T. in the error handling procedure when an error occurs.
This means I have to include an IF statement after every file operation or other potential error causing event to evaluate gl_Did_Error_Occur to see if an error occurred and take the action within the IF statement.
Tell me there's an easier way... please. (I'm new to VFP)
Is there a way to tell if an error has occurred once you RETURN from the err handling procedure?
All I can think of seams lame:
ON ERROR DO MyErrProc
Public gl_Did_Error_Occur
gl_Did_Error_Occur = .F.
Then I place a line of code setting gl_Did_Error_Occur = .T. in the error handling procedure when an error occurs.
This means I have to include an IF statement after every file operation or other potential error causing event to evaluate gl_Did_Error_Occur to see if an error occurred and take the action within the IF statement.
Tell me there's an easier way... please. (I'm new to VFP)