Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Errorhandling
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00007224
Message ID:
00007241
Vues:
30
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform