<cffinally>

Used inside a cftry tag. Code in the cffinally block is processed after the main cftry code and, if an exception occurs, the cfcatch code. The cffinally block code always executes, whether or not there is an exception.

This tag must have a body.

This tag is also supported within <cfscript>

This tag does not use any attributes.

<cffinally><!--- body ---></cffinally>

Examples

<cftry>
  <cfset a = 2/0>
  <cfdump var="#a#" />  
  <cfcatch type="any">
    Caught an error.
  </cfcatch>
  <cffinally>
    This is from cffinally.
  </cffinally>
</cftry>

See also