Information générale
Catégorie:
Codage, syntaxe et commandes
Scot Becker ... Fredrik Lilja wrote:
>
> >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 execut
> >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?
>
> ... You may want to code your error handler to determine the error and whether or not it is fatal.
>
> HTH,
> Scot.
I agree with Scot about error determining. I suggest you create a few arrays of errorcodes in
which errors are grupped by criminality. Then, after error occurs, you need just determine
to which array Error() value belong and pass control to correspond code (here I'm using Case).
For me it allways works properly.
Good luck.
Vidmantas
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement