Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
TYPE() function misfire....
Message
From
06/08/1998 03:31:53
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
03/08/1998 14:09:57
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00123594
Message ID:
00124395
Views:
21
>Has anyone ever had the TYPE function error?
>
>Here's the situation.....
>
>FPD 2.6 on a 486-33 (doesn't need to run on anything faster)
>
>We have an error coming up from a UDF on a variable that is calculated from a parameter.
>
>Trying to get around (what we thought was) the source of the error, decided to try checking the 'type' of the parameters and make sure they were what we expected them to be, but the line
>
>IF type('pStrttime') # 'C'
>
>returns an error along the lines of "Variable Not Found"
>
>Any ideas??
Dorris,
I think it's not the real line of error. An "ON .." routine, deactivate, activate, show etc all might be the real cause. Another thing, I think you didn't forget to write whole error message but quotes. 'Variable "varname" not found' is the expected message and it seems Fox is even not returning a var name.
You cannot set step on but may log error and check prog stack. Temporarily replace your default handler with this one (before a call to exectime).
ON ERROR DO errhand WITH ;
	ERROR(), MESSAGE(), MESSAGE(1), PROGRAM(), LINENO(),lineno(1)

PROCEDURE errhand
PARAMETER merror, mess, mess1, mprog, mlineno, mlineno1
set textmerge on
set textmerge to error.txt noshow
\Error no      :<<LTRIM(STR(merror))>>
\Error message :<<mess>>
\Error line 1  :<<LTRIM(STR(mlineno))>>
\Error line 2  :<<LTRIM(STR(mlineno1))>>
\Error module  :<<mprog>>
for lnPrg=1 to 255
	if empty(program(lnPrg))
		EXIT
	ENDIF	
	\	Level <<ltrim(str(lnPrg))>> : <<program(lnPrg)>>
endfor
set textmerge TO
set textmerge oFF
modi comm error.txt nomodi
Hope helps.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform