iOS | Android | UWP | Mac | |
---|---|---|---|---|
XfxEntry | ||||
XfxComboBox | ||||
XfxCardView |
ErrorText
property is set, the ErrorText will display, otherwise if it is null or empty, it's removed.ErrorText
property.ItemsSource
property, SelectedItem
property, and a SortingAlgorithm
property.SortingAlgorithm
<cferror template = 'template path' type = 'exception|validation|request' exception = 'exception type' mailTo = 'e-mail address'> |
Note: You can specify this tag's attributes in an attributeCollection attribute whose value is a structure. Specify the structure name in the attributeCollection attribute and use the tag's attribute names as structure keys. |
Attribute | Req/Opt | Default | Description |
---|---|---|---|
template | Required | Relative path to the custom error page. (A ColdFusion page was formerly called a template.) | |
type | Required | Type of error that the custom error page handles. The type also determines how ColdFusion handles the error page. For more information, see Specifying a custom error page in Specifying custom error messages with the cferror tag in the Developing ColdFusion Applications.
| |
exception | Optional | any | Type of exception that the tag handles:
|
mailTo | Optional | An e-mail address. This attribute is available on the error page as the variable error.mailto. ColdFusion does not automatically send anything to this address. |
Page type | Description | Use |
---|---|---|
Exception | Dynamically invoked by the CFML language processor when it detects an unhandled exception condition.Uses the full range of CFML tags. Error variables must be in cfoutput tags. | Can handle specific exception types or display general information for exceptions. |
Request | Includes the error variables described in the Error variables section. Cannot include CFML tags, but you can display values of the error variables by enclosing them in number signs (#), as in #error.MailTo#. | Use as a backup error handler to other error handling methods, including exception type. |
Validation | Handles data input validation errors that occur when submitting a form that uses hidden form-field validation or onSubmit validation. Cannot include CFML tags, but you can display values of the error variables by enclosing them in number signs (#), as in #Error.InvalidFields#.Specify the validation error handler in the Application.cfc or Application.cfm file. | Handles hidden form-field or onSubmit format validation errors only. |
Page type | Error variable | Description |
---|---|---|
Validation only | error.validationHeader | Validation message header text. |
error.invalidFields | Unordered list of validation errors. | |
error.validationFooter | Validation message footer text. | |
Request and Exception | error.diagnostics | Detailed error diagnostics from ColdFusion. |
error.mailTo | Skype without microsoft account windows 7. E-mail address (same as value in cferror.MailTo). | |
error.dateTime | Date and time when error occurred. | |
error.browser | Browser that was running when error occurred. | |
error.remoteAddress | IP address of remote client. | |
error.HTTPReferer | Page from which client accessed link to page where error occurred. | |
error.template | Page executing when error occurred. | |
error.generatedContent | The content generated by the page up to the point where the error occurred. | |
error.queryString | URL query string of client's request. | |
Exception only | error.message | Error message associated with the exception. |
error.rootCause | The root cause of the exception. This structure contains the information that is returned by a cfcatch tag. For example, for a database exception, the SQL statement that caused the error is in the error.RootCause.Sql variable. For Java exceptions, this variable contains the Java servlet exception reported by the JVM as the cause of the 'root cause' of the exception. | |
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. | |
error.type | Exception type. |
Note: If type = 'exception', you can substitute the prefix cferror for Error; for example, cferror.diagnostics, cferror.mailTo, or cferror.dateTime. |
<h3>cferror Example</h3> <!--- Example of cferror call within a page. NOTE: If you use cferror type='VALIDATION' you MUST put it in Application.cfc or Application.cfm ---> <cferror type = 'REQUEST' template = 'request_err.cfm' mailTo = '[email protected]'> <!--- This query calls a non-existent datasource, triggering an error to be handled. ---> <cfquery name='testQuery' datasource='doesNotExist'> select * from nothing </cfquery> <!--- Example of the page (request_err.cfm) to handle this error. ---> <html> <head> <title>We're sorry -- An Error Occurred</title> </head> <body> <h2>We're sorry -- An Error Occurred</h2> <p> If you continue to have this problem, please contact #error.mailTo# with the following information:</p> <p> <ul> <li><b>Your Location:</b> #error.remoteAddress# <li><b>Your Browser:</b> #error.browser# <li><b>Date and Time the Error Occurred:</b> #error.dateTime# <li><b>Page You Came From:</b> #error.HTTPReferer# <li><b>Message Content</b>: <p>#error.diagnostics#</p> </ul> |