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

Click here to load this message in the networking platform