Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error handling
Message
De
26/11/1998 02:51:52
 
 
À
25/11/1998 14:06:10
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00161252
Message ID:
00161718
Vues:
16
>>Privet Edward.
>>Thanks for your reply.
>>
>>FOR EXAMPLE...
>>
>>FORM1.COMMAND.CLICK
>>line1. replace table.field1 with "1"
>>line2. it is line with error
>>line3. replace table.field2 WITH "2"
>>
>>In the line 2 there is an error. The function the error handler "ONERROR" is called.
>>
>>PROCEDURE ONERROR
>>LPARAM ....
>>
>>FOR i=_screen.formcount to 1 step -1
>>....
>> _screen.forms(i).RELEASE
>>ENDFOR
>>
>>After that we come back on line3 (REPLACE) of an example and we receive an error... (Show open table dialog window)
>>How to make so that a method did not proceed after _screen.forms(i).release ()
>>Denis.
>
>Privet,
>
>
>cError=on("error")
>on error lErrorflag=.t.
>*** one or more commands here
>on error &cError.
>if lErrorflag=.t.
> =messagebox("all forms will be released")
> return
>endif
>
>
>You may reset flag in error routine too


If I precisely know in what unit to expect an error... But there are cases that the error will take place there where it was not expected, from for changes of units by other programmers. (Unfortunately joint operation not so well is organized) How to be then?
Really in to correct each method?
The best way certainly to put CANCEL in the error handler, that the method, which has called an error, further was not executed, but then application will be closed.
All question in, that from the error handler to transfer handle to READ EVENTS without executable of methods inside the closed forms and method called this error.
Denis.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform