
Error messages and the standard error format
291
■
If the Administrator Settings Site-wide Error Handler field specifies an error handler page,
ColdFusion displays the specified error page.
■
Otherwise, ColdFusion reports the error using the standard error message format described
in
“Error messages and the standard error format” on page 291
.
Runtime exception errors
If ColdFusion encounters a runtime exception, it does the action for the
first
matching condition
in the following table:
For example, if an exception occurs in CFML code that is not in a
cftry
block, but a
cferror
tag specifies a page to handle this error type, ColdFusion uses the specified error page.
Error messages and the standard error format
If your application does not handle an error, ColdFusion displays a diagnostic message in the
user’s browser.
Error information is also written to a log file for later review. (For information on error logging,
see
“Logging errors with the cflog tag” on page 297
.)
The standard error format consists of the information listed in the following table. ColdFusion
does not always display all sections.
Condition
Action
The code with the error is inside a
cftry
tag
and the exception type is specified in a
cfcatch
tag.
Executes the code in the
cfcatch
tag.
If the
cftry
block does not have a
cfcatch
tag for this
error, tests for an appropriate
cferror
handler or
site-wide error handler.
A
cferror
tag specifies an exception error
handler for the exception type.
Uses the error page specified by the
cferror
tag.
The Administrator Settings Site-wide Error
Handler field specifies an error handler page.
Uses the custom error page specified by the
Administrator setting.
A
cferror
tag specifies a Request error
handler.
Uses the error page specified by the
cferror
tag.
The default case.
Uses the standard error message format
Section
Description
Error description
A brief, typically on-line, description of the error.
Error message
A detailed description of the error. The error message diagnostic information
displayed depends on the type of error. For example, if you specify an invalid
attribute for a tag, this section includes a list of all valid tag attributes.
Error location
The page and line number where ColdFusion encountered the error, followed
by a short section of your CFML that includes the line. This section does not
display for all errors.
In some cases, the cause of an error can be several lines above the place where
ColdFusion determines that there is a problem, so the line that initially causes
the error might not be in the display.
Содержание COLDFUSION MX 61-DEVELOPING COLDFUSION MX
Страница 1: ...Developing ColdFusion MX Applications...
Страница 22: ...22 Contents...
Страница 38: ......
Страница 52: ...52 Chapter 2 Elements of CFML...
Страница 162: ......
Страница 218: ...218 Chapter 10 Writing and Calling User Defined Functions...
Страница 250: ...250 Chapter 11 Building and Using ColdFusion Components...
Страница 264: ...264 Chapter 12 Building Custom CFXAPI Tags...
Страница 266: ......
Страница 314: ...314 Chapter 14 Handling Errors...
Страница 344: ...344 Chapter 15 Using Persistent Data and Locking...
Страница 349: ...About user security 349...
Страница 357: ...Security scenarios 357...
Страница 370: ...370 Chapter 16 Securing Applications...
Страница 388: ...388 Chapter 17 Developing Globalized Applications...
Страница 408: ...408 Chapter 18 Debugging and Troubleshooting Applications...
Страница 410: ......
Страница 426: ...426 Chapter 19 Introduction to Databases and SQL...
Страница 476: ...476 Chapter 22 Using Query of Queries...
Страница 534: ...534 Chapter 24 Building a Search Interface...
Страница 556: ...556 Chapter 25 Using Verity Search Expressions...
Страница 558: ......
Страница 582: ...582 Chapter 26 Retrieving and Formatting Data...
Страница 668: ......
Страница 734: ...734 Chapter 32 Using Web Services...
Страница 760: ...760 Chapter 33 Integrating J2EE and Java Elements in CFML Applications...
Страница 786: ...786 Chapter 34 Integrating COM and CORBA Objects in CFML Applications...
Страница 788: ......
Страница 806: ...806 Chapter 35 Sending and Receiving E Mail...