User manual MACROMEDIA COLDFUSION 5-DEVELOPING APPLICATIONS
Lastmanuals offers a socially driven service of sharing, storing and searching manuals related to use of hardware and software : user guide, owner's manual, quick start guide, technical datasheets... DON'T FORGET : ALWAYS READ THE USER GUIDE BEFORE BUYING !!!
If this document matches the user guide, instructions manual or user manual, feature sets, schematics you are looking for, download it now. Lastmanuals provides you a fast and easy access to the user manual MACROMEDIA COLDFUSION 5-DEVELOPING APPLICATIONS. We hope that this MACROMEDIA COLDFUSION 5-DEVELOPING APPLICATIONS user guide will be useful to you.
Lastmanuals help download the user guide MACROMEDIA COLDFUSION 5-DEVELOPING APPLICATIONS.
Manual abstract: user guide MACROMEDIA COLDFUSION 5-DEVELOPING APPLICATIONS
Detailed instructions for use are in the User's Guide.
[. . . ] Developing ColdFusion Applications
MacroMedia ColdFusion® 5
Macromedia® Incorporated
Copyright Notice
© 19992001 Macromedia Incorporated. This book, as well as the software described in it, is furnished under license and may be used or copied only in accordance with the terms of such license. The content of this manual is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Macromedia, Incorporated. Macromedia, Incorporated assumes no responsibility or liability for any errors or inaccuracies that may appear in this book. [. . . ] After you create a custom error page, you must include the cferror tag in your application's Application. cfm page. For more information, see "Understanding the Web Application Framework" on page 214. For detailed information on the cferror tag, see the CFML Reference.
200
Chapter 11 Preventing and Handling Errors
Creating an error application page
Error application pages for validation and request errors cannot use ColdFusion tags; they can only use HTML tags. Error application pages for exception and monitor errors can use all of CFML, including tags, expressions, and functions. Even validation and request error pages have access to specific CFML error variables such as Error. Diagnostics (for request errors) and Error. InvalidFields (for validation errors). All CFML error variables start with the prefix Error. To include these variables in your HTML, surround the variable names with pound signs, but do not use the cfoutput tag; for example:
<p> ColdFusion found the following errors in the data you entered: </p> #error. InvalidFields#<br>
Error page variables
The following variables are available on error pages: Error type Exception Request Monitor Error variable
error. type
Description The exception type. For a list of error types, see "Types of recoverable exceptions supported" on page 205. Detailed error diagnostics from ColdFusion Server. E-mail address of administrator who should be notified (corresponds to the value set in the mailTo attribute of
cferror).
error. diagnostics error. mailTo
error. dateTime error. browser
Date and time when the error occurred. Browser that was running when the error occurred. content.
error. generatedContent The failed request's generated error. remoteAddress error. HTTPReferer
IP address of the remote client. Page from which the client accessed the link to the page where the error occurred. Page being executed when the error occurred. URL query string of the client's request.
error. template error. queryString
Generating Custom Error Messages with cferror
201
Error type Validation
Error variable
Description message.
error. validationHeader Text for header of default 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. message.
error. validationFooter Text for footer of default validation
Example of a request error page
The following example shows a custom error page for a request error:
<html> <head> <title>Products - Error</title> </head> <body> <cfoutput> <h2>Sorry</h2> <p>An error occurred when you requested this page. Please email the Webmaster to report this error. We will work to correct the problem and apologize for the inconvenience. </p> <table border=1> <tr><td><b>Error Information</b> <br> Date and time: #error. DateTime# <br> Page: #error. template# <br> Remote Address: #error. remoteAddress# <br> HTTP Referer: #error. HTTPReferer#<br> <br> Diagnostics:<br> #error. diagnostics# </td></tr></table> </cfoutput> </body> </html>
202
Chapter 11 Preventing and Handling Errors
Example of a validation error page
The following example shows a custom error page for a validation error:
<html> <head> <title>Products - Error</title> </head> <body> <h2>Oops</h2> <p>You failed to correctly complete all the fields in the form. The following problems occurred:</p> #error. invalidFields# </body> </html>
Logging Errors
ColdFusion Server provides extensive capabilities for generating, managing, and viewing log files, as described in Advanced ColdFusion Administration. ColdFusion automatically logs errors to the default logs in the following cases: · If you use the default error handlers · If a cferror handler of type Request handles the error Otherwise you must use the cflog tag in your error handling code to generate log entries. The cflog tag lets you specify the following information: · A custom file or standard ColdFusion log file in which to write the message. [. . . ] Make changes as needed on the Edit CFX Tag page. Click Submit Changes.
Distributing CFX Tags
405
To delete a CFX tag:
· Click the Delete Applet (right-most) icon in the Controls column of the Registered CFX Tags list for the tag you want to delete. On Windows NT only, the Visual C++ Custom Tag Wizard automatically registers custom tags so that they can be tested and debugged.
Distributing CFX Tags
If you are distributing a custom tag, you can automatically register it during the setup process by writing the registration entries directly into the registry. The following table lists the registry entries. [. . . ]
DISCLAIMER TO DOWNLOAD THE USER GUIDE MACROMEDIA COLDFUSION 5-DEVELOPING APPLICATIONS Lastmanuals offers a socially driven service of sharing, storing and searching manuals related to use of hardware and software : user guide, owner's manual, quick start guide, technical datasheets... In any way can't Lastmanuals be held responsible if the document you are looking for is not available, incomplete, in a different language than yours, or if the model or language do not match the description. Lastmanuals, for instance, does not offer a translation service. Click on "Download the user manual" at the end of this Contract if you accept its terms, the downloading of the manual MACROMEDIA COLDFUSION 5-DEVELOPING APPLICATIONS will begin.