296
Chapter 14: Handling Errors
The following table describes the variables available on error pages:
Exception error pages can also use all of the exception variables listed in the section
“Exception
information in cfcatch blocks” on page 301
. To use these variables, replace the
cfcatch
prefix
with
cferror
or
error
. For example, to use the exception message in an error page, refer to it as
error.message
.
In general, production Exception and Request pages should not display detailed error
information, such as that supplied by the
error.diagnostics
variable. Typically, Exception
pages e-mail detailed error information to an administrative address or log the information using
the
cflog
tag instead of displaying it to the user. For more information on using the
cflog
tag,
see
“Logging errors with the cflog tag” on page 297
.
Error page type Error variable
Description
Validation
error.invalidFields
Unordered list of validation errors that occurred. This
includes any text that you specify in the value
attribute or a hidden tag used to validate form input.
error.validationHeader
Text for the header of the default validation message.
error.validationFooter
Text for the footer of the default validation message.
Exception and
Request
error.browser
Browser that was running when the error occurred.
error.dateTime
Date and time when the error occurred.
error.diagnostics
Detailed error diagnostics.
error.generatedContent
Any content that ColdFusion generated in response
to the request prior to the error.
error.HTTPReferer
Page containing the HTML link to the page on which
the error occurred. This value is an empty string if the
user specified the page directly in the browser.
error.mailTo
E-mail address of the administrator who should be
notified. This value is set in the
mailTo
attribute of the
cferror
tag.
error.queryString
URL query string of the client's request, if any.
error.remoteAddress
IP address of the remote client.
error.template
Page being executed when the error occurred.
Exception only
error.messge
Error message associated with the exception.
error.rootCause
Java servlet exception reported by the JVM as the
cause of the "root cause" of the exception. This
variable is a Java object.
error.tagContext
Array of structures containing information for each
tag in the tag stack The tag stack consists of each tag
that is currently open. For more information, see
“Exception information in cfcatch blocks”
on page 301
error.type
Exception type. For more information, see
“About
ColdFusion exceptions” on page 288
.
Summary of Contents for ColdFusion MX
Page 1: ...Developing ColdFusion MX Applications...
Page 22: ...22 Contents...
Page 38: ......
Page 52: ...52 Chapter 2 Elements of CFML...
Page 162: ......
Page 218: ...218 Chapter 10 Writing and Calling User Defined Functions...
Page 250: ...250 Chapter 11 Building and Using ColdFusion Components...
Page 264: ...264 Chapter 12 Building Custom CFXAPI Tags...
Page 266: ......
Page 314: ...314 Chapter 14 Handling Errors...
Page 344: ...344 Chapter 15 Using Persistent Data and Locking...
Page 349: ...About user security 349...
Page 357: ...Security scenarios 357...
Page 370: ...370 Chapter 16 Securing Applications...
Page 388: ...388 Chapter 17 Developing Globalized Applications...
Page 408: ...408 Chapter 18 Debugging and Troubleshooting Applications...
Page 410: ......
Page 426: ...426 Chapter 19 Introduction to Databases and SQL...
Page 476: ...476 Chapter 22 Using Query of Queries...
Page 534: ...534 Chapter 24 Building a Search Interface...
Page 556: ...556 Chapter 25 Using Verity Search Expressions...
Page 558: ......
Page 582: ...582 Chapter 26 Retrieving and Formatting Data...
Page 668: ......
Page 734: ...734 Chapter 32 Using Web Services...
Page 760: ...760 Chapter 33 Integrating J2EE and Java Elements in CFML Applications...
Page 786: ...786 Chapter 34 Integrating COM and CORBA Objects in CFML Applications...
Page 788: ......