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

Click here to load this message in the networking platform