MACROMEDIA COLDFUSION MX 61-CFML Reference page 65

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

Attributes
Attribute Req/Opt
type
Optional
Usage
You must code at least one
block. ColdFusion MX tests
cftry
requires an end tag.
If
, ColdFusion MX catches exceptions from any CFML tag, data source, or external
type="any"
object. To get the exception type use code such as the following:
#cfcatch.type#
Applications can use the
exceptions with any of these
custom_type
"
"
"Application"
"Any"
The custom_type type is a developer-defined type specified in a
custom type as a series of strings concatenated by periods (for example,
"
MyApp.BusinessRuleException.InvalidAccount
type by its character pattern. ColdFusion MX searches for a
a matching exception type, starting with the most specific (the entire string), and ending with the
least specific.
For example, you could define a type as follows:
<cfthrow type = "MyApp.BusinessRuleException.InvalidAccount">
If you have the following
<cfcatch type = "MyApp.BusinessRuleException.InvalidAccount">
Otherwise, if you have the following
<cfcatch type = "MyApp.BusinessRuleException">
Finally, if you have the following
<cfcatch type = "MyApp">
You can code
cfcatch
If you specify
type = "Application"
the
type in the
Application
Default
Description
Any
• application: catches application exceptions
• database: catches database exceptions
• template: catches ColdFusion page exceptions
• security: catches security exceptions
• object: catches object exceptions
• missingInclude: catches missing include file exceptions
• expression: catches expression exceptions
• lock: catches lock exceptions
• custom_type: catches the specified custom exception type
that is defined in a
• searchengine: catches Verity search engine exceptions
• any: catches all exception types
tag within a
cfcatch
cfcatch
tag to throw developer-defined exceptions. Catch these
cfthrow
options:
type
tag, it will handle the exception:
cfcatch
cfcatch
tag, it will handle the exception:
cfcatch
tags in any order to catch a custom exception type.
, the
cfcatch
tag that defines them.
cfthrow
tag
cfthrow
block. Put
cftry
tags in the order in which they appear. This tag
cfthrow
"), ColdFusion MX can catch the custom
cfcatch
tag, it will handle the exception:
tag catches only custom exceptions that have
tags at the end of a
cfcatch
tag. If you define a
tag in the
block with
cftry
cfcatch
65

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents