Macromedia coldfusion 4.5-cfml language reference ユーザーズマニュアル

ページ / 608
218
CFML Language Reference 
CFTHROW
The CFTHROW tag raises a developer-specified exception that can be caught with 
CFCATCH tag having any of the following type specifications:
CFCATCH TYPE= "custom_type "
CFCATCH TYPE= "APPLICATION "
CFCATCH TYPE= "ANY "
Syntax
<CFTHROW 
TYPE= "exception_type "
MESSAGE="message"
DETAIL= "detail_description "
ERRORCODE= "error_code "
EXTENDEDINFO= "additional_information ">
TYPE
Optional. A custom type or the predefined type APPLICATION. None of the other 
predefined types should be specified because these types are not generated by 
ColdFusion applications. If you specify the exception type APPLICATION, you 
need not specify a type for CFCATCH, because the APPLICATION type is the 
default CFCATCH type.
MESSAGE
Optional. A message that describes the exceptional event. 
DETAIL
Optional. A detailed description of the event. The ColdFusion server appends the 
position of the error to this description; the server uses this parameter if an error is 
not caught by your code. 
ERRORCODE
Optional. A custom error code that you supply. 
EXTENDEDINFO
Optional. A custom error code that you supply. 
Usage
Use CFTHROW within a 
CFTRY
 block to raise an error condition.The CFCATCH block 
can access any accompanying information as follows: 
Message with CFCATCH.message 
Detail with CFCATCH.detail 
Error code with CFCATCH.errorcode. 
To get additional information, use CFCATCH.TagContext. TagContext captures 
the context of the exception; that is, the name and position of each tag in the 
tag stack, and the full path names of the files that contain the tags in the tag 
stack.