Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Try, Catch, Finally
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00830232
Message ID:
00830304
Views:
22
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform