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.
Содержание COLDFUSION 4.5-CFML LANGUAGE
Страница 1: ...Allaire Corporation CFML Language Reference ColdFusion 4 5...
Страница 207: ...Chapter 1 ColdFusion Tags 183 CFCATCH CFTRY BODY HTML...
Страница 224: ...200 CFMLLanguageReference CFOUTPUT P Text within CFOUTPUT is always shown CFOUTPUT BODY HTML...
Страница 296: ...272 CFMLLanguageReference INPUT TYPE text NAME number2 BR INPUT TYPE submit NAME submit VALUE Add FORM BODY HTML...
Страница 336: ...312 CFMLLanguageReference CFIF BODY HTML...
Страница 404: ...380 CFMLLanguageReference DE It is morning CFOUTPUT P BODY HTML...
Страница 413: ...Chapter 2 ColdFusion Functions 389 Customer BalanceDue BR CFOUTPUT CFIF BODY HTML...
Страница 483: ...Chapter 2 ColdFusion Functions 459 CFOUTPUT CFLOOP BODY HTML...
Страница 557: ...Chapter 2 ColdFusion Functions 533 P CFOUTPUT Value i is employee keysToStruct i CFOUTPUT P CFLOOP CFIF BODY HTML...
Страница 584: ...560 CFMLLanguageReference...
Страница 594: ...570 CFMLLanguageReference...