>Thanks for the reply guys.
>
>I'm trapping the error by doing somthing like :
>
>ON ERROR oError.ErrorHandler(error(),sys(16),lineno())
>
>In the oError.ErrorHandler method I have the following parameters to accept the values from the on error call.
>
>LPARAMETERS tnError, tcMethod, tnLine
>
>tnError is 0
>
>if I replace the error handler and place it in a standard prg, so my on error handler looks like :
>
>ON ERROR errhand(ERROR(),SYS(16),LINENO())
>
>When the error occurs and errhand.prg is run then tnError is still 0.
>
>Weird eh?
Weird indeed. One thing that comes to mind is to try to pass only 2nd and 3rd parameter (i.e. omit the error()/tnError completely) and check for what error() will return in the body of errhand itself.
I haven't had much of these weird experiences, but did have some - and the aError() seems to cover a few things that error() doesn't. Maybe the simplest would be
if tnError=0
aError(a)
tnError=a[2]
endif
somewhere early in your error handler.