Is the original error handler set using ON ERROR? If so, you can use Josh's suggestion in the following manner:
PROCEDURE MyFunction
LOCAL cErrorHandler
cErrorHandler=ON("ERROR")
ON ERROR DO newhandler
.
.
IF !EMPTY(cErrorHandler)
ON ERROR &cErrorHandler
ENDIF
RETURN
You might want to look at using the Error event instead of ON ERROR.
>I need to temporarily set to error handler in a function. I would like to set the handler back to whatever it was in the calling function, but I can't find a way to get VFP5.0 to tell me what the original handler was. I'm sure it's simple, but I can't figure it out.
>
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05