Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Catch not Firing
Message
 
À
18/04/2003 09:57:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00779148
Message ID:
00779166
Vues:
15
>
>      try
>         erase (lcSecondDoc)
>         if file(lcSecondDoc)
>            wait window 'Erase clearly failed because the file still exist! Catch should fire.'
>         endif
>      catch
>         wait window 'Document in use'
>         .ActiveDocument.close(0)
>         .application.quit
>         oWord = .null.
>         release oWord
>         llReturn = .t.
>      endtry
>
Robert,

The CATCH in this case is not firing because no error has occurred (according to Fox). Move your ERASE out of the TRY/CATCH and you will see that no error is generated. The ERASE command does not generate errors. If you want to catch an error for this, you could put an ERROR command or THROW command where your WAIT WINDOW is.
_________________________________
There are 2 types of people in the world:
    Those who need closure
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform