Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error handling problem - Help!
Message
 
To
11/06/2002 18:48:20
General information
Forum:
Visual FoxPro
Category:
CodeMine
Miscellaneous
Thread ID:
00667122
Message ID:
00667139
Views:
28
The code is within a method of an object on the form - and yes, I'm doing it for someone else who has CodeMine.

>Michael,
>
>Where is this code? Is it in a form method or within a method of an object on a form?
>
>Are you trying to solve this for someone else who has Codemine?
>
>I am running Codemine, and I'm willing to help out...
>
>>I've put together a Visual Class using the MSCOMM object. One of the methods scans the ports for live serial ports to look for an attached device.
>>
>>The way the scan works is that it communicates with each port in turn. If it gets an error, the port's assumed not to exist. This works fine in vanilla VFP - I substitute the ONERROR routine just before the test and then restore it afterwards:
>>
>>
mbhError = ""
>>
>>cOldErrorHandler = ON('ERROR')
>>
>>IF TYPE('THIS.nCommPort') <> 'N'
>>	THIS.nCommPort=VAL(THIS.nCommPort)
>>ENDIF
>>IF BETWEEN(THIS.nCommPort,1,16)
>>	ON ERROR mbhError = "Error "+TRANSFORM(ERROR()) + ": "+ SYS(2018)
>>	THIS.CommPort=THIS.nCommPort
>>	THIS.PortOpen=.T.
>>	ON ERROR &cOldErrorHandler
>>....
>>Well, CodeMine's error handler seems to be smarter than me - it seems to catch the error and report it instead of allowing my error handler to just grab the description of the error and act accordingly.
>>
>>So... I tried putting the error handling code into the ERROR procedure of the class. Once again, it works in vanilla VFP, but not within the CodeMine framework.
>>
>>Since I don't own CodeMine, it's hard to test and diagnose the cure for this malady. Can someone tell me how to bypass the CodeMine error handler for my comm check? Should I put it in the screen's ERROR procedure with a dodefault if it's not the error I'm trapping, or what?
>>
>>TIA
>>Michael
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform