Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Try/catch and line contents in run-time
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Try/catch and line contents in run-time
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01146719
Message ID:
01146719
Vues:
110
Hi everybody,

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?

Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform