Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error Record Out of Range
Message
From
14/08/2018 09:28:13
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01661541
Message ID:
01661591
Views:
34
>>>>>>If it were in the one of the other methods, that's what you'd see. That's why I suggested it's in code that isn't in a method. Are you capturing the whole call stack in your error log?
>>>>>>
>>>>>>Tamar
>>>>>
>>>>>Yes, the error log captures the entire call stack.
>>>>
>>>>And the offending line is...?
>>>
>>>The error log does not have line numbers. The program is compiled without the source.
>>
>>Actually wrong... you don't have the lines themselves, but the line numbers remain for VFP's internal reference. So start logging the lineno() - and then you can find the content of the line in the source from which you built.
>
>I just checked the actually error log on the customer server and all values of lineno() are 0 (zero). Here is the code that logs the call stack:
>
>
>	ASTACKINFO(aStackArray)
>	FOR i = ALEN(m.aStackArray, 1) - 1 To 1 Step - 1
>		cStackArray = cStackArray + "<br>"
>		cStackArray4Log = cStackArray4Log + CHR(13) + CHR(10) 
>		cStackArray = cStackArray + CHR(13) + "Stack Level: " + ALLTRIM(STR(i)) + "<br>"
>		cStackArray4Log = cStackArray4Log + CHR(13) + CHR(10) + "Stack Level: " + ALLTRIM(STR(i)) 
>		cStackArray = cStackArray + CHR(13) + "Program: " + m.aStackArray(m.i, 2) + "<br>"
>		cStackArray4Log = cStackArray4Log + CHR(13) + CHR(10) + "Program: " + m.aStackArray(m.i, 2) 
>		cStackArray = cStackArray + CHR(13) + "Module : " + m.aStackArray(m.i, 3) + "<br>"
>		cStackArray4Log = cStackArray4Log + CHR(13) + CHR(10) + "Module : " + m.aStackArray(m.i, 3) 
>		cStackArray = cStackArray + CHR(13) + "Source : " + m.aStackArray(m.i, 4) + "<br>"
>		cStackArray4Log = cStackArray4Log + CHR(13) + CHR(10) + "Source : " + m.aStackArray(m.i, 4) 
>		cStackArray = cStackArray + CHR(13) + "Line   : " + TRANSFORM(m.aStackArray(m.i, 5)) + "<br>"
>		cStackArray4Log = cStackArray4Log + CHR(13) + CHR(10) + "Line   : " + TRANSFORM(m.aStackArray(m.i, 5))
>		cStackArray = cStackArray + CHR(13) + "Source : " + m.aStackArray(m.i, 6) + "<br>"
>		cStackArray4Log = cStackArray4Log + CHR(13) + CHR(10) + "Source : " + m.aStackArray(m.i, 6) 
>	NEXT 
>
>
>Do you see what is wrong with the line above that stores the Line number?

Probably nothing (except the space in "Line :" and other such places... ahem). I guess we stopped stripping the code out of our app long ago, exactly for debugging purposes and given that the size of the app and that it's vfp is pretty good deterrent against theft of code. Anyone who'd want to do that would have to spend at least a year to understand what's inside, and by that time he'd be broke :).

BTW, what you're doing here is rather vebose... I prefer this:
		N=ASTACKINFO(aStk)

		lcStk=""
		lcStk = lcStk + TEXTMERGE("Call Stack at <<DTOS(DATE())>>.<<SECONDS()>>")+0h0d
		FOR i=1 TO N-1
			lcStk = lcStk + TEXTMERGE("<<aStk[i,1]>> <<aStk[i,3]>> in <<aStk[i,2]>>")+0h0d
			lcStk = lcStk + TEXTMERGE("	<<TRANSFORM(aStk[i,5], [99999])>> <<aStk[i,6]>>")+0h0d
		ENDFOR
		lcStk = lcStk + 0h0d

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform