Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error Handling in Executables
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00123826
Message ID:
00123832
Views:
17
>I have the problem that I can not always get what I am looking for out of my error handler. I have a form that opens some tables in the LOAD. I purposely have a file in use on another network machine to force an error. When writing an entry to an error database, I use the following code:
>INSERT INTO ERRORLOG(APP, ERROR, MESSAGE, CODELINE, PROGRAM) ;
>VALUES ( 'APPNAME', ERROR(), MESSAGE(), MESSAGE(1), PROGRAM())
>
>When running the form, called by a .prg, the MESSAGE(1) returns the correct line of code: USE K:\CUSTOMER.DBF which is the line that is triggering the File Access Denied Error. When this application is run as an executable, MESSAGE(1) returns "DO K:\CUSTAPP.EXE"
>
>Consequently, I cant tell file the user is being denied access to when running the EXE.

There is also a LINE() function that will return the line number of code you are running.


Wayne
Wayne Myers, MCSD
Senior Consultant
Forte' Incorporated
"The only things you can take to heaven are those which you give away" Author Unknown
Previous
Reply
Map
View

Click here to load this message in the networking platform