Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Try/catch and line contents in run-time
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Try/catch and line contents in run-time
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01146719
Message ID:
01146719
Views:
111
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
Next
Reply
Map
View

Click here to load this message in the networking platform