Yes, I use an error handler. The problem is this:
When the project is built with Debug info for the project CHECKED, the error handler returns the line no.
When the project is built with Debug info for the project UNCHECKED, the error handler returns 0 for the line no.
Do you get something different?
Cyril.
>Cyril
>You can use LineNo(), and an error handler. Here is an example from the VFP help on the ON ERROR command
>ON ERROR DO errhand WITH ;
> ERROR( ), MESSAGE( ), MESSAGE(1), PROGRAM( ), LINENO( )
>*** The next line should cause an error ***
>USE nodatabase
>ON ERROR
>PROCEDURE errhand
>PARAMETER merror, mess, mess1, mprog, mlineno
>CLEAR
>? 'Error number: ' + LTRIM(STR(merror))
>? 'Error message: ' + mess
>? 'Line of code with error: ' + mess1
>? 'Line number of error: ' + LTRIM(STR(mlineno))
>? 'Program with error: ' + mprog
>
>
>HTH
>Jaime
>
>>If I uncheck Debug info for a project, I do not get the line no for errors. Is this correct?
>>
>>I prefer to uncheck Debug info because it makes the app a lot smaller. Is there a way to uncheck it and still get the line no of errors?
>>
>>Cyril.