Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error trapping in Classes
Message
De
27/08/2002 11:35:12
 
 
À
26/08/2002 14:26:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00693752
Message ID:
00694046
Vues:
15
Hi Glenn

I understand.

Thanks
Jim


>Make sure you have only a "default" handler for the error method in the class. If even the handler is all blanks but not "DEFAULT" then it will intercept the error, and not allow your global error handler to process the error.
>
>Glenn
>
>
>>Hello group,
>>
>>Today I am learning Error trapping.
>>
>>I put an ON ERROR DO ODBCErrorHandler in my connection method code. I then put in the PROCEDURE ODBCErrorHandler and found out we can not nest procedures in a class method.
>>
>>Then made a public method called ODBCErrorHandler and hoped it would be called by ON ERROR DO ODBCErrorHandler which has the following test code in it.
>>
>>LOCAL lcErrorString
>>
>>= AERROR(Eray) && Data from most recent error
>>
>>lcErrorString = "Error Number " + alltrim(str(eray(1)))
>>MESSAGEBOX(lcErrorString)
>>
>>I instansiated the class and sent it an erroneous connection string and no messagebox appeared.
>>
>>How do I handle errors within a class method.
>>
>>Thanks
>>Jim
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform