Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Errorhandling
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00007224
Message ID:
00007241
Views:
31
>I use the ON ERROR command in the beginning of my program to call my own errorhandler (a procedure).
>When an error occurs in my application my errorhandler shows a messagebox with some information about the error, but then my application just continues executing after the line of code wich caused the error. This of course generates new error messages because I have already started to close down my application in the errorhandler.
>I want to be able to stop the code from executing and close all open databases, tables and windows and release the application. How shall I do?

In addition to Alistair's suggestions, try to save any changes to any modified tables/views and log the errors in some sort of text file or something. Remember, to be more robust, some errors can be handled. For instance, a uniqueness violation is as simple as a message box and a TableRevert()/Rollback. You may want to code your error handler to determine the error and whether or not it is fatal.

HTH,
Scot.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform