Lucee Function Reference

throw()

Throws a developer-specified exception, which can be caught with a cfcatch tag.

Example

throw([any message,[string type,[string detail,[string errorcode,[string extendedInfo,[any object,[any cause]]]]]]]):void

Category

exception

Arguments

The arguments for this function are set. You can not use other arguments except the following ones.
Name Type Required Default Value Description
message any  No   Message that describes exception event.  
type string  No application A custom type, or Application. Do not enter another predefined type; types are not generated by CFML applications. If you specify Application, you need not specify a type for cfcatch.  
detail string  No   Additional detailed description of the exception.  
errorcode string  No   A custom error code that you supply.  
extendedInfo string  No   Extended information to the exception.  
object any  No   Throws a Java exception from a CFML tag. This attribute is mutually exclusive with all other arguments of this function.  
cause any  No   The cause of the exception created with this tag. This can be a cfcatch block or a native java exception.