Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Try, Catch, Finally
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00830232
Message ID:
00830304
Vues:
23
>My concern is that I don't know if ASP.NET executes code in Finally just as fast as it would in any other part of the page?

I don't think you will see a different in speed regardless of whether you put your code (between TRY/CATCH or between FINALLY/ENDTRY)

Yet, code in Finally will be executed regardless of whether you have an error or not!!! So I don't think you want to put most of your code in the Finally block.

My recommendation would be to put most of your business login between inside the TRY (before the first CATCH) and leave the FINALLY section for cleaning dutties that must happen regardless of whether there is an error or not (e.g. closing database connections.)
Hector Correa
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform