Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Try/catch and line contents in run-time
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01146719
Message ID:
01146947
Vues:
30
This message has been marked as the solution to the initial question of the thread.
The LineContents property doesn't return anything useful in runtime. It's populated from the program source code which is not avalable there.

>In lots of our programs we're using try/catch mechanism to catch to exception object. I have a simple Log_Error procedure
>lcError = [Error: ] + transform(m.toError.errorno) + CRLF + ;
>	[LineNo: ] + transform(m.toError.lineno) + CRLF +  ;
>	[Message: ] + m.toError.message  + CRLF +  ;
>	[Procedure: ] + m.toError.procedure + CRLF +  ;
>	[Details: ] + m.toError.details  + CRLF + ;
>	[StackLevel: ] + transform(m.toError.stacklevel) + CRLF + ;
>	[LineContents: ] + m.toError.linecontents
>
>It seems like in run-time the LineContents can either be blank or be absolutely unrelated line of code such as ri_handler("delete").
>
>Here is a sample of this problem:
>
>Error: 12
>LineNo: 3102
>Message: Variable 'TCSTATUS_CODE' is not found.
>Procedure: update_codes
>Details: TCSTATUS_CODE
>StackLevel: 9
>LineContents: __ri_handler("INSERT")
>
>
>In few rare cases it does provide the content correctly. What should I do?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform