Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to prevent app quit on error
Message
De
03/03/2011 20:50:56
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01501996
Message ID:
01502585
Vues:
65
Hi Soykan.
>>
>>>i am using below codes for error handling top my start.prg at my app is there another way to continue to app when error occured... just show error message and ask to user "Do You Want to Continue or Exit" etc...
>>
>>The key to continuing in the app is to return to the READ EVENTS statement using RETURN TO. The best way to do that is to put READ EVENTS into a method of an object and then RETURN TO (method name).
>>
>>Doug
>
>Hi Doug,
>would you like post here sample errhandler.prg codes that you adviced ?

This is just off the top of my head, but it's something like this:

Main.prg:

on error do ErrHandler with ... (the usual parameters you'd use)
oApp = createobject('MyApplication')
oApp.ReadEvents()

MyApplication.ReadEvents:

read events

ErrHandler.prg

* usual error handling tasks here
if llStayInApplication
return to ReadEvents
endif

Doug
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform