Whatever message this page gives is out now! Go check it out!

onAbort

Last update:
May 18, 2026

Description

Runs when you execute the tag cfabort.
Note: If showError attribute is specified in cfabort, onError method is executed instead of OnAbort.
Note: When using cfabort, cflocation, or cfcontent tags, the OnAbort method is invoked instead on OnRequestEnd.

Returns

Nothing

Syntax

<cffunction name="onAbort" returnType="boolean"> <cfargument type="string" name="targetPage" required=true/> ... <cfreturn BooleanValue /> </cffunction>

Parameters

ParameterDescription
targetPage
The path from the web root to the requested CFML page.

Example

Application.cfc
<cfcomponent> <cffunction name="onAbort" access="public" returntype="void" hint="Hanldes Aborted request"> <cfargument type="String" name="targetPage" required=true/> <cfoutput> Target Page: #targetPage#</cfoutput> <!--- do stuff ---> </cffunction> </cfcomponent>
Test.cfm
<cfabort>

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page