Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help in LINENO()
Message
 
 
À
31/01/2001 09:33:06
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00470587
Message ID:
00470624
Vues:
32
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
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform