Walter Meester
HoogkarspelNetherlands
Hi, Virusim
Check the 'debug info' checkbox on the project manager. VFP, is only able to track the lineno when debug info is included.
Walter,
>
>My VFP6 written application had the error handle below
>to cater for any error in my program for ease of debugging
>and testing
>
>ON ERROR DO ERRORHANDLE WITH ERROR(), MESSAGE(), LINENO(), PROGRAM() < == in my main program
>
>
>PROCEDURE ErrorHandle(pvErrorno, pvMessage, pvLineno, pvProgram)
>
>
> LOCAL lPath, lFileHandle, lStr
>
> lPath = SYS(5)+CURDIR()
>
> IF FILE(lPath+'Error.log')
> lFileHandle = FOPEN(lPath+'Error.log',2)
> ELSE
> lFileHandle = FCREATE(lPath+'Error.log')
> ENDIF
>
> FSEEK(lFileHandle,0,2)
>
> lStr = 'Error on '+TTOC(DATETIME())
> FPUTS(lFileHandle,lStr,LEN(lStr))
>
> lStr = 'Program with Error '+pvProgram
> FPUTS(lFileHandle,lStr,LEN(lStr))
>
> lStr = 'Error No = '+ALLT(STR(pvErrorNo))
> FPUTS(lFileHandle,lStr,LEN(lStr))
>
> lStr = 'Error Message = '+pvMessage
> FPUTS(lFileHandle,lStr,LEN(lStr))
>
> lStr = 'Error Line = '+ALLT(STR(pvLineNo))
> FPUTS(lFileHandle,lStr,LEN(lStr))
>
> lStr = CHR(13)+CHR(10)
> FPUTS(lFileHandle,lStr,LEN(lStr))
>
> FCLOSE(lFileHandle)
>
>ENDPROC
>
>
>However, when my program encountered any error, the log file will
>only capture my program function/procedure name, but the lineno
>is always 0, what is wrong with my program coding. Please kindly
>advise me as this problem is giving headache as I can't pinpoint
>which line is giving me error.
>
>Thank you
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only