Hi Einar,
If you have VFP8, than TRY ... ENDRY would be much better alternative.
TRY
CATCH TO oExp
FINALLY
ENDTRY
Your idea will work too. I used it myself a few times. However, if there's ERROR() method in effect, ON ERROR cannot overwrite it.
>I hope this is possible. If it isn't I think it would be a pretty nice feature.
>
>Here is what I would like to accomplish: I want to store the current on error command, then set on error to something else, then do my stuff and finally set the on error back to what it used to be. i.e.
>
>
>store on error to OldOnError
>on error TempOnErrorProcedure()
>*some code
>on error &OldOnError
>
>
>Please let me know if you think this is a crazy idea.
>
>Thanks,
>Einar
--sb--