Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing an error
Message
De
06/09/2000 15:03:15
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00413131
Message ID:
00413145
Vues:
22
>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
Fil
Voir

Click here to load this message in the networking platform