CFLib.org – Common Function Library Project

Abort([showError])

Last updated October 16, 2002

author

Raymond Camden

Version: 1 | Requires: CF6 | Library: CFMLLib

Description:
Mimics the cfabort tag.

Return Values:
Does not return a value.

Example:

<cfscript>
x = 1;
//abort("Foo");
</cfscript>

Parameters:

Name Description Required
showError An error to throw. No

Full UDF Source:

<!---
 Mimics the cfabort tag.
 
 @param showError      An error to throw. (Optional)
 @return Does not return a value. 
 @author Raymond Camden (ray@camdenfamily.com) 
 @version 1, October 16, 2002 
--->
<cffunction name="abort" output="false" returnType="void">
    <cfargument name="showError" type="string" required="false">
    <cfif isDefined("showError") and len(showError)>
        <cfthrow message="#showError#">
    </cfif>
    <cfabort>
</cffunction>

Search CFLib.org


Latest Additions

Raymond Camden added
QueryDeleteRows
November 04, 2017

Leigh added
nullPad
May 11, 2016

Raymond Camden added
stripHTML
May 10, 2016

Kevin Cotton added
date2ExcelDate
May 05, 2016

Raymond Camden added
CapFirst
April 25, 2016

Created by Raymond Camden / Design by Justin Johnson