Reference_4_0_Tags_cfabort - getrailo/railo GitHub Wiki

CFML tags


Description

Stops the processing of a cfml page at the tag location. Railo returns everything that was processed before the tag.

Syntax

<cfabort 
	showError = "error message" 
	type="request|page">

Attributes

Attribute Req/Opt Default Description
showError optional Error to display, in a standard cfml error page, when tag executes.
type optional request Defines whether a request is aborted completely (request) or if only the current cfml-template is aborted (page).

History

  • Type attribute added in 3.0

Examples

Template index.cfm
Hello
<cfinclude template="name.cfm">
<cfoutput>#name#</cfoutput>

Template main.cfm
<cfset name="Railo">
<cfabort type="page">
<cfthrow message="your are too far">

Output:
Hello Railo
⚠️ **GitHub.com Fallback** ⚠️