Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trapping errors in .exe automation server
Message
 
 
To
21/03/2003 02:11:30
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00768468
Message ID:
00768595
Views:
22
Michael,

You can use ERROR() event of your class.

>VFP7 documentation states
>
>
>SYS(2335 [, 0 | 1])
>Return Values
>Character
>
>Parameters
>0
>Enables unattended mode. When unattended mode is enabled, a Visual FoxPro error is generated whenever a modal state occurs. Your .exe automation server can trap for these errors with an ON ERROR routine.
>

>
>Can't figure out how to use this ON Error in automation server
>
>something like
>
>DEFINE CLASS retrieval  AS CUSTOM OLEPUBLIC
>
>...
>
>FUNCTION todosearch( lkeyword , lpath, ltable )
>    ON ERROR do terminate
>    =SYS(2335,0)
>    ...
>ENDFUNC
>
>PROCEDURE terminate
>  RETURN
>ENDPROC
>
>ENDDEFINE
>
>obviously results in error
>OLEDispatch Exception 1 from: file terminate.prg does not exist
>Should I create a separate terminate.prg ?
>
>TIA
>Michael
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform