General information
Title:
Error trapping in Classes
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
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only