-
-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
improve the throw function (add cause)
- Loading branch information
1 parent
8f174e8
commit 54ccf0e
Showing
2 changed files
with
19 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
<cffunction name="throw" output="no" returntype="void" | ||
hint="Throws a developer-specified exception, which can be caught with a cfcatch tag"><cfargument | ||
name="message" type="string" required="no" hint="Message that describes exception event."><cfargument | ||
name="type" type="string" required="no" default="application" hint="- A custom type | ||
- 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."><cfargument | ||
name="detail" type="string" required="no" hint="additional detailed description of the exception."><cfargument | ||
name="errorcode" type="string" required="no" hint=" A custom error code that you supply."><cfargument | ||
name="extendedInfo" type="string" required="no" hint="extended information to the exception."><cfargument | ||
name="object" type="any" required="no" hint="Throws a Java exception from a CFML tag. This attribute is mutually exclusive with all other arguments of this function."><!--- | ||
---><cfthrow attributeCollection="#arguments#" contextlevel="2"><!--- | ||
---></cffunction> | ||
<cfscript> | ||
/** | ||
* Throws a developer-specified exception, which can be caught with a cfcatch tag | ||
* @message Message that describes exception event. | ||
* @type - A custom type | ||
* - 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 additional detailed description of the exception. | ||
* @errorcode A custom error code that you supply. | ||
* @extendedInfo extended information to the exception. | ||
* @object Throws a Java exception from a CFML tag. This attribute is mutually exclusive with all other arguments of this function. | ||
* @cause The cause of the exception created with this tag. This can be a cfcatch block or a native java exception. | ||
*/ | ||
void function throw(string message, string type="application", string detail, string errorcode, string extendedInfo, object, cause) { | ||
```<cfthrow attributeCollection="#arguments#" contextlevel="2">``` | ||
} | ||
</cfscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters