Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trapping errors in .exe automation server
Message
From
21/03/2003 02:11:30
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Trapping errors in .exe automation server
Miscellaneous
Thread ID:
00768468
Message ID:
00768468
Views:
39
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
Next
Reply
Map
View

Click here to load this message in the networking platform