<cfexit>

Used to: Abort the processing of the currently executing CFML custom tag, exit the template within the currently executing CFML custom tag and reexecute a section of code within the currently executing CFML custom tag

This tag cannot have a body.

This tag is also supported within <cfscript>

Attribute Description
method
string, optional

Allowed values:

  • exittag: aborts processing of currently executing tag
  • exittemplate: exits page of currently executing tag
  • loop: reexecutes body of currently executing tag
<cfexit
    [method=string]
>

Examples

lucee+trycf <cfloop from=1 to="10" index="i"> <cfdump var="#i#" /> <cfif i Eq 5> <cfexit> </cfif> </cfloop>

See also