Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error handling
Message
From
29/10/1999 21:33:37
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Error handling
Miscellaneous
Thread ID:
00284234
Message ID:
00284234
Views:
47
Hi,
I have a class which subclass OLE MSCOMM32.ocx. I have code as following:

myclass.InitMy (MSComm32)

this.CommPort=2
this.Settings="9600,N,8,1"
this.PortOpen=.t.
this.InputLen=1
**do whatever**

When my application go through this method, I get "Invalid port number" ERROR.... it seem to be I don't install COM2 in my machine. Therefore, I place my error handle in myclass.ERROR().
My question is how could I exit from myclass.InitMy() if error occur? At this moment, VFP will continue with the rest of code even error occurs, therefore user will get other error cause by the previous error!!!

Any ideas?
Thank you
I am not the most powerful man in this world.
I am not the worst man in this world either.
I just as same as all of you.
I still need to learn from my mistakes...
Next
Reply
Map
View

Click here to load this message in the networking platform