Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Return to Master
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 5
OS:
Windows XP
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01000372
Message ID:
01001042
Views:
27
You may want to take a look at Mike Asherman's error handler at http://www.ideaxchg.com/ix07/

>I trying to write a general error recovery procedure. When my VFP program encounters a situation it cannot resolve, such as inability to open a data file, I want to display a message, clean up, and return to the main screen and menu. This could occur almost anywhere in the program and at any read level.
>
>I have tried the following code:
>procedure AbortProc
>*- display message
>...
>*- close all tables
>close all
>*- release popups
>release popups
>*- release all user windows
>clear windows
>*- release memvars except globals and a few we need
>release all except p_*, cTitle, mainbutton
>set procedure to
>*- return to main menu
>return to master	&& AbortProc
>This seems to work most of the time, but in some situations what happens is that after returning to the main menu, when I select a menu item the program crashs. ("VFP has encountered a program and needs to shut down...") I guess I'm not cleaning up correctly, but I don't see what else to do.
>
>Does anyone have suggestions?
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform