>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
>
>
IF !EMPTY(cErrorHandler)
ON ERROR &cErrorHandler
ELSE
ON ERROR && <<- If you dont put this then the error handler remains
&& in effect in the calling program!
ENDIF