Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error() - The Bubble Effect
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00364283
Message ID:
00364797
Vues:
18
>>>Yes. It doesn't generate the Fox standard error for the errors I'm not trapping. That is what I want.
>>
>>Chad,
>>If you trap any errors, you have to make arrangements to do something with the errors you don't trap. Just add a messagebox() with the error information (that's basically what VFP does anyway *s*) in the Otherwise.
>
>Well, by adding a messagebox for any errors I don't trap, isn't that in effect trapping them??? I don't want to trap them. There doesn't seem to be any way to trap some errors, but not others.

I'm not sure I understand.

By instituting an Error routine (via ON ERROR or Error method) you have trapped every error except for the truly untrappable errors. See http://fox.wikis.com/wc.dll?wiki~UnTrappableErrors~VFP. In your error routine, you decide what you want to do with the errors. They are already trapped. The following are some suggestions:

1. Do some processing to correct the error and then issue a RETRY which will attempt the line that caused the error again.
2. Ignore the error entirely and issue a RETURN. This will continue processing with the line after the one that caused the error.
3. You could display some information to the end user, and ask what to do, RETRY, IGNORE or SHUTDOWN.

There is no in between. You can't have an error routine fire for some errors and not others. It fires for all; you decide what to do in your error routine based on the error.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform