Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trapping errors in .exe automation server
Message
De
21/03/2003 02:11:30
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Trapping errors in .exe automation server
Divers
Thread ID:
00768468
Message ID:
00768468
Vues:
38
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform