General information
Category:
Coding, syntax & commands
>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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only