AndrewMozley
Programmer
I am working on an application where run-time errors do not seem to be being reported.
To check this out, I have included these instructions in a cmd.click() method (Note : Variable ‘Wrong’ is undefined):
ERROR 1
Right = Wrong
I have not been able to track down the error handler (not aware that it is not the standard error handler, but clearly something has changed). I believe that both of these last two instructions should cause run-time errors.
Have expanded the code to :
ON ERROR DO Thisform.TempError WITH ERROR(), MESSAGE(), MESSAGE(1), PROGRAM(), LINENO()
ON ERROR DO Thisform.TempError(ERROR(), MESSAGE(), MESSAGE(1), PROGRAM(), LINENO( ))
SET STEP ON
ERROR 1
Right = Wrong
The method Thisform.TempError() does exist. It starts with a SET STEP ON instruction. At run-time no error is reported. If I single-step after that first SET STEP ON, the message “Source not available” appears in the debugger, but the program then continues happily (but still does not report errors) - there are several!
I would be grateful for specific guidance about how to correct my program so that VFP can report back to me the errors in my code.
Thanks. Andrew
To check this out, I have included these instructions in a cmd.click() method (Note : Variable ‘Wrong’ is undefined):
ERROR 1
Right = Wrong
I have not been able to track down the error handler (not aware that it is not the standard error handler, but clearly something has changed). I believe that both of these last two instructions should cause run-time errors.
Have expanded the code to :
ON ERROR DO Thisform.TempError WITH ERROR(), MESSAGE(), MESSAGE(1), PROGRAM(), LINENO()
ON ERROR DO Thisform.TempError(ERROR(), MESSAGE(), MESSAGE(1), PROGRAM(), LINENO( ))
SET STEP ON
ERROR 1
Right = Wrong
The method Thisform.TempError() does exist. It starts with a SET STEP ON instruction. At run-time no error is reported. If I single-step after that first SET STEP ON, the message “Source not available” appears in the debugger, but the program then continues happily (but still does not report errors) - there are several!
I would be grateful for specific guidance about how to correct my program so that VFP can report back to me the errors in my code.
Thanks. Andrew