| Package: MachII.util |
| Encapsulates exception information. |
| Method Summary | |
|---|---|
| public Exception |
init([string type=""], [string message=""], [string errorCode=""], [string detail=""], [string extendedInfo=""], [array tagContext="#ArrayNew(1)#"])
Used by the framework for initialization. Do not override. |
| public any |
getCaughtException()
Gets caughtException (cfcatch) that was collected at the point of the exception. |
| public string | getDetail() |
| public string | getErrorCode() |
| public string | getExtendedInfo() |
| public string | getMessage() |
| public array | getTagContext() |
| public string | getType() |
| public void | setCaughtException(any caughtException) |
| public void | setDetail([string detail]) |
| public void | setErrorCode([string errorCode]) |
| public void | setExtendedInfo([string extendedInfo]) |
| public void | setMessage([string message]) |
| public void | setTagContext([array extendedInfo]) |
| public void | setType([string type]) |
| public Exception |
wrapException(any caughtException)
Wraps and sets caughtException (cfcatch). |
| Method Detail |
|---|
| getCaughtException |
|---|
public any getCaughtException( )
Gets caughtException (cfcatch) that was collected at the point of the exception.
Parameters:
Code:
<cffunction name="getCaughtException" access="public" returntype="any" output="false" hint="Gets caughtException (cfcatch) that was collected at the point of the exception."> <cfreturn variables.caughtException /> </cffunction>
| getDetail |
|---|
public string getDetail( )
Parameters:
Code:
<cffunction name="getDetail" access="public" returntype="string" output="false"> <cfreturn variables.detail /> </cffunction>
| getErrorCode |
|---|
public string getErrorCode( )
Parameters:
Code:
<cffunction name="getErrorCode" access="public" returntype="string" output="false"> <cfreturn variables.errorCode /> </cffunction>
| getExtendedInfo |
|---|
public string getExtendedInfo( )
Parameters:
Code:
<cffunction name="getExtendedInfo" access="public" returntype="string" output="false"> <cfreturn variables.extendedInfo /> </cffunction>
| getMessage |
|---|
public string getMessage( )
Parameters:
Code:
<cffunction name="getMessage" access="public" returntype="string" output="false"> <cfreturn variables.message /> </cffunction>
| getTagContext |
|---|
public array getTagContext( )
Parameters:
Code:
<cffunction name="getTagContext" access="public" returntype="array" output="false"> <cfreturn variables.tagContext /> </cffunction>
| getType |
|---|
public string getType( )
Parameters:
Code:
<cffunction name="getType" access="public" returntype="string" output="false"> <cfreturn variables.type /> </cffunction>
| init |
|---|
public Exception init( [string type=""], [string message=""], [string errorCode=""], [string detail=""], [string extendedInfo=""], [array tagContext="#ArrayNew(1)#"] )
Used by the framework for initialization. Do not override.
Parameters:
| [string type=""] |
| [string message=""] |
| [string errorCode=""] |
| [string detail=""] |
| [string extendedInfo=""] |
| [array tagContext="#ArrayNew(1)#"] |
Code:
<cffunction name="init" access="public" returntype="Exception" output="false" hint="Used by the framework for initialization. Do not override."> <cfargument name="type" type="string" required="false" default="" /> <cfargument name="message" type="string" required="false" default="" /> <cfargument name="errorCode" type="string" required="false" default="" /> <cfargument name="detail" type="string" required="false" default="" /> <cfargument name="extendedInfo" type="string" required="false" default="" /> <cfargument name="tagContext" type="array" required="false" default="#ArrayNew(1)#" /> <cfset setType(arguments.type) /> <cfset setMessage(arguments.message) /> <cfset setErrorCode(arguments.errorCode) /> <cfset setDetail(arguments.detail) /> <cfset setExtendedInfo(arguments.extendedInfo) /> <cfset setTagContext(arguments.tagContext) /> <cfreturn this /> </cffunction>
| setCaughtException |
|---|
public void setCaughtException( any caughtException )
Parameters:
| any caughtException |
Code:
<cffunction name="setCaughtException" access="public" returntype="void" output="false"> <cfargument name="caughtException" type="any" required="true" /> <cfset variables.caughtException = arguments.caughtException /> </cffunction>
| setDetail |
|---|
public void setDetail( [string detail] )
Parameters:
| [string detail] |
Code:
<cffunction name="setDetail" access="public" returntype="void" output="false"> <cfargument name="detail" type="string" required="false" /> <cfset variables.detail = arguments.detail /> </cffunction>
| setErrorCode |
|---|
public void setErrorCode( [string errorCode] )
Parameters:
| [string errorCode] |
Code:
<cffunction name="setErrorCode" access="public" returntype="void" output="false"> <cfargument name="errorCode" type="string" required="false" /> <cfset variables.errorCode = arguments.errorCode /> </cffunction>
| setExtendedInfo |
|---|
public void setExtendedInfo( [string extendedInfo] )
Parameters:
| [string extendedInfo] |
Code:
<cffunction name="setExtendedInfo" access="public" returntype="void" output="false"> <cfargument name="extendedInfo" type="string" required="false" /> <cfset variables.extendedInfo = arguments.extendedInfo /> </cffunction>
| setMessage |
|---|
public void setMessage( [string message] )
Parameters:
| [string message] |
Code:
<cffunction name="setMessage" access="public" returntype="void" output="false"> <cfargument name="message" type="string" required="false" /> <cfset variables.message = arguments.message /> </cffunction>
| setTagContext |
|---|
public void setTagContext( [array extendedInfo] )
Parameters:
| [array extendedInfo] |
Code:
<cffunction name="setTagContext" access="public" returntype="void" output="false"> <cfargument name="extendedInfo" type="array" required="false" /> <cfset variables.tagContext = arguments.extendedInfo /> </cffunction>
| setType |
|---|
public void setType( [string type] )
Parameters:
| [string type] |
Code:
<cffunction name="setType" access="public" returntype="void" output="false"> <cfargument name="type" type="string" required="false" /> <cfset variables.type = arguments.type /> </cffunction>
| wrapException |
|---|
public Exception wrapException( any caughtException )
Wraps and sets caughtException (cfcatch).
Parameters:
| any caughtException |
Code:
<cffunction name="wrapException" access="public" returntype="Exception" output="false" hint="Wraps and sets caughtException (cfcatch)."> <cfargument name="caughtException" type="any" required="true" hint="The cfcatch." /> <cfset setType(arguments.caughtException.type) /> <cfset setMessage(arguments.caughtException.message) /> <cfset setErrorCode(arguments.caughtException.errorCode) /> <cfset setDetail(arguments.caughtException.detail) /> <cfset setExtendedInfo(arguments.caughtException.extendedInfo) /> <cfset setTagContext(arguments.caughtException.TagContext) /> <cfset setCaughtException(arguments.caughtException) /> <cfreturn this /> </cffunction>