Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why does Message(1) return bogus info in my error handle
Message
From
23/07/1999 11:59:17
 
 
To
22/07/1999 21:56:05
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00245133
Message ID:
00245363
Views:
11
>Hi,
>
>I've noticed that for some reason the function message(1) in VFP 5 (I haven't tried it in VFP6) returns a bogus command line about 80% of the time. This is in an app where I have included the Debug info in the project.
>
>I can recreate the error very easily. Lets say in the beginning of the program I have the following:
>
>on error do errorhand with error(),message(),program(),lineno(),message(1)
>
>Then in the middle of the program I type this:
>
>lcBogusCommand="dsklfd;ajk;klja"
>&lcBogusCommand
>
>This will obviously return an error but instead of Message(1) returning the actual command line that caused the error, my messagebox appears with the following:
>
>Error 16:Unrecogized command verb.
>Line 42 of orphanrec
>BETWEEN(lsterm_mo,0,11)
>
>The last line is completely bogus, I think lsterm_mo is a variable in a different .prg file, not even in this project, but possibly in the same directory. Does anyone know why this happens? The actual error handler I use is below, very simple for a very simple program.


AFAIK, this happens in all compiled code. I know this is true in my error handler as well. The runtime handler does ok with LINENO(), ERROR(), MESSAGE(), but can't read the actual code that caused the error. From my experience, MESSAGE(1) gets filled with the last internally used SQL to operate on your data. This is sometimes interesting to see how VFP formaulates TABLEUPDATES and REQUERYs...
Erik Moore
Clientelligence
Previous
Reply
Map
View

Click here to load this message in the networking platform