Hello,
My question is how to catch errors within VFP class methods?
Is there something like try(), catch() and throw() I know from C++, and if what is the name from it, because I can't find it anywhere?
The problem is when I'm writing a method from a class and I've got a piece of code, that can generate an error I want to catch the error and call the method this.Undo().
With on error this.Undo() it says can't find reference to this, you have to give the name from the object.Undo() instead. But when writing class methods, I don't know how I will call the method. And trapping the error when I use the method isn't handy, because it has automatically to call the undo() method otherwise with programming you can forget to call the undo(), and it isn't nice OOP programmed.
Thanks for your time.
Charl
My question is how to catch errors within VFP class methods?
Is there something like try(), catch() and throw() I know from C++, and if what is the name from it, because I can't find it anywhere?
The problem is when I'm writing a method from a class and I've got a piece of code, that can generate an error I want to catch the error and call the method this.Undo().
With on error this.Undo() it says can't find reference to this, you have to give the name from the object.Undo() instead. But when writing class methods, I don't know how I will call the method. And trapping the error when I use the method isn't handy, because it has automatically to call the undo() method otherwise with programming you can forget to call the undo(), and it isn't nice OOP programmed.
Thanks for your time.
Charl