Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Try Catch with Catch 2 times
Message
De
01/06/2021 07:17:25
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01680817
Message ID:
01680865
Vues:
54
J'aime (1)
>Hi,
>
>Could someone create a sample code with Try Catch such that Try will trigger an error and then Catch will trigger an error such that it would go back to the Catch again? That is, where the Catch code fires twice. I have had that condition once (I saw it in the debugger) but forgot how the error in my code triggered it.
>

Also worth noting that you can have multiple Catch clauses in a single Try-Catch if they use the When clause:
TRY 
  * Something
CATCH TO oExc WHEN oExc.ErrorNo = n
  * One response for a special case
CATCH TO oExc WHEN oExc.ErrorNo = m
  * Different response for a different special case
CATCH
  * The rest of the cases
ENDTRY
Tamar
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform