Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Raising Errors - Should I
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Raising Errors - Should I
Divers
Thread ID:
00410823
Message ID:
00410823
Vues:
45
Here's the deal. I'm writing a module that fits into a much larger application. The application has an excellent ON ERROR routine which logs everything and takes a snapshot of the system.

At one point in my module, I check a value field which should never be higher than, say, 2400. If it is, my module will not be able to do its business. If the value is higher than 2400, something is very wrong with the system.

I'm thinking of just putting the command:
ERROR "The value " + STR(x) + " is higher than 2400."
The system error handler will grab this, take a snapshot and walk the user through a shutdown of the app. Obviously, I'll make my module return a .F., and set an internal error flag as well.

My question is this. What do you think of sounding my own ERROR within this module? Bad juju? I guess a more typical alternative would be to fire a message box explaining what happened and return a .F. from the module. But, if the problem identifies something that has gone haywire elsewhere in the system, shouldn't I sound the alarm?

Marty
Marty Smith, CSQE
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform