Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieving File Name if File Access Error Occurs
Message
From
01/06/2001 20:33:05
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00512287
Message ID:
00514095
Views:
12
>Al,
>
>Thanks for the input. I created a procedure that worked pretty well when used in the development (VFP.exe) environment, but when used with runtime EXE it did not perform well. Instead of MESSAGE(1) returning information about the code line, it returned the "DO EXE_Filename.exe" string. My guess is that this may be acting this way since it can't go to the actual code line to use it.
>
>Your solution could work, but I am not sure that I want that much code effort put into each call to a network file. Could there be some other way??

There always is :-) Seriously, with this technique you add one line of code just before each table open - that's pretty lightweight. Even better, you could create a function that opens your tables for you and put it in there.

The issue is, that by the time your error handler is called, an error has occurred, and the error handler is pretty much on its own. If you're macro expanding you don't have the file name in the source, so you need to get it to a place your handler can read it, somehow.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform