Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help in LINENO()
Message
 
 
To
01/02/2001 04:31:40
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00470587
Message ID:
00471228
Views:
24
Virusim,

Try the advice from this thread (I still haven't chance to test it myself). Don't forget to back up your code before doing it.

Visual FoxPro in general Re: TIP OF THE DAY: Losing Debuginfo without lineno in errors Thread #451117

>Hi,
>
>Thank a lot for your advise. Now, I can see my error code.
>But my file size get big. So, any way to had the same function
>without having the debug info. Please advise and comment.
>
>
>>You didn't say whether this occurs in the development environment or the run-time (EXE). If it only happens in the EXE, then the problem is you need to specify that you want to include Debug information when you create your EXE (from the VFP main menu, select Project - Project Info and check the Debug Info checkbox). Otherwise, VFP doesn't include the necesarry informatino in the EXE to track line numbers so it always returns 0.
>>
>>HTH.
>>
>>>Hi,
>>>
>>>I having some problem in using the function LINENO() with my
>>>error handling procedure. Insteads of returning me the line no
>>>where the code is giving error, it instead return me 0. I had
>>>play with it but in vain. I can't seem to get it to return the
>>>error code line when my application hit error. It either return
>>>0 or the line no in my error handle procedure which are both
>>>not what I want. I want it to know which function/procedure when
>>>hit error, will trigger my error handle and it will help to
>>>report the line no of the function/procedure. Please advise
>>>and help me with code example. Thank you very much
>>>
>>>Below is how I use it in my code
>>>
>>>ON Error DO ErrorHandler WITH ERROR(), MESSAGE(), MESSAGE(1), LINENO()
>>>
>>>
>>>PROCEDURE ErrorHandle(pvError, pvMessage, pvMessage1, pvLineNo)
>>>
>>> ? pvLineNo <------ this always return 0 or error handle line no
>>> when LINENO()/LINENO(1)
>>>
>>>ENDPROC
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform