Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Triggering code when receiving an error
Message
 
 
To
26/03/2006 12:54:39
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01107788
Message ID:
01107797
Views:
25
>I'm integrating Mappoint with VFP8. If Mappoint cannot find the address I get an OLE error - type mismatch. I would like to eliminate the error from popping up and instead run additional code. Is there an IF ENDIF statement I could use to detect the error? Thanks.

You can use TRY...ENDTRAY.
TRY
  * Execute code that could trigger an error
CATCH TO oException WHEN INLIST(oException.ErrorNo, 1426, 1429)
  * additional code
FINALLY
  * Do some cleanup
ENDTRY
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform