Finally Use

  • If you have an Exit Sub statement in your catch block. Normally this statement would exit the subroutine immediately, but in this situation the Finally Block is executed first.
  • In ASP.NET app and you have a Response.Redirect statement in your Catch block, once again the Finally Block would be called before the redirect happens.
  • If there is another error that happens within your Catch block code, normally it would be immediately raised to the calling code, but in this situation the Finally Block is called first.