forked from misterdai/cfbackport
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcf9.cfm
More file actions
19 lines (16 loc) · 974 Bytes
/
cf9.cfm
File metadata and controls
19 lines (16 loc) · 974 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<!---
Based upon http://cflib.org/udf/Throw, modified to match CF9 throw() argument order
--->
<cffunction returnType="void" name="throw" output="false" hint="CFML Throw wrapper">
<cfargument name="message" type="string" default="" hint="Message for Exception">
<cfargument name="type" type="string" default="Application" hint="Type for Exception">
<cfargument name="detail" type="string" default="" hint="Detail for Exception">
<cfargument name="errorCode" type="string" default="" hint="Error Code for Exception">
<cfargument name="extendedInfo" type="string" default="" hint="Extended Info for Exception">
<cfargument name="object" type="any" hint="Object for Exception">
<cfif NOT IsDefined("arguments.object")>
<cfthrow message="#arguments.message#" type="#arguments.type#" detail="#arguments.detail#" errorCode="#arguments.errorCode#" extendedInfo="#arguments.extendedInfo#">
<cfelse>
<cfthrow object="#arguments.object#">
</cfif>
</cffunction>