Throws a developer-specified exception, which can be caught
with a catch block.
throw([message] [, type] [, detail] [, errorcode] [, extendedinfo] [, object])
→ returns numeric
Custom
Custom
Application
Database
Template
Security
Object
MissingInclude
Expression
Lock
SearchEngine
Use the throw function to throw a custom application exception.
<cfscript>
throw(type="MyCustomError", message="A custom error has been thrown!");
</cfscript>
Use the throw function to throw a custom exception when the http response is invalid.
if (!isJSON(httpResponse.fileContent)) {
throw(type="InvalidHTTPResponse",message="The http response was not valid JSON");
}
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.