That is good, but if you give users the ability to *Ignore* errors you need to ensure that your code accounts for that.
For e.g. you always issue the DELETE command as DELETE IN
.
If you are going to allow *Ignore* of errors you must be conscious of this as you write every line of your code and ensure that you will not cause data corruption when a procedure continues into code it is not supposed to.
Here is an example of correctily coding if you allow ignoring of errors:
IF NOT DBF() == UPPER(lcTableToZap)
ELSE
ZAP
ENDIF
>I've used this error handler as the most simple to get done what has to be done.
>
>on error do ezerror with message()
>
>
>PROCEDURE Ezerror
>PARAMETERS cMessage
>lnVal = messagebox("AN ERROR OCCURED" + CHR(13) + CHR(13) + cMessage + CHR(13) + CHR(13),2)
>DO CASE
> CASE lnval = 3
> CANCEL
> CASE lnval=4
> RETRY
> CASE lnval=5
> RETURN
>
>ENDCASE
>RETURN
>
>No constants, no subroutines, no external routines. Simple as it gets.
George