Information générale
Catégorie:
Codage, syntaxe et commandes
>I am trying to figure out how to trap an error in a class (error 3, file is in use), and then raise a custom error that gives the user a better explanation. I don't want to use a messagebox or anything like that. This is a business level class, and I really like to keep interface out of it if possible.
How about surpressing all errors, storeing the error number in a property (nError) and returning a .F., indicting failure.
Then the calling object should be able to tell that it failed, look at the public nError property and decide what it wants to do itself.
Will that work for you?
Précédent
Suivant
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