Information générale
Catégorie:
Codage, syntaxe et commandes
>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
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