Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error Handling in VFP 5.0a
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00080468
Message ID:
00112737
Vues:
41
>Robert,
>
>When the error occurs in the method code of an object, it's error method fires off, so the object still has "code on the call stack". An object can't be released if it has code executing because that would invalidate the call stack and crash most miserably.
>
>>I had a generic on error do .... routine that I use everywhere. It checks for all objects on a given form and if type('objectName') returns 'O' then I attempt to destroy it. All is well except if the object that caused the problem, I had a container that called a drive a:, b: etc. caused the error, then the error calls the error routine, the object that caused the problem failed to unload.


David,

Thanks, but is there a way to get around this generically, without having to write error code for each object? .resettodefault? Or am I destined to have to write specific code to deal with every instance where I may have a faulty bit of code? If I simply return after running my error routine in most cases it will only return to the error routine on the succeeding lines having to deal with different error numbers for each case. That would be tricky. I would prefer to have a catch all, release the form and leave it in the program (.exe).

Robert
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform