home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 1999 April / APC443.iso / features / grpware / coldfus / coldfusi.exe / data1.cab / Documentation / snippets / cferror.cfm < prev    next >
Encoding:
Text File  |  1998-10-08  |  1.5 KB  |  52 lines

  1. <!--- This view-only example shows the use of CFERROR --->
  2. <HTML>
  3. <HEAD>
  4. <TITLE>CFERROR Example</TITLE>
  5. </HEAD>
  6.  
  7. <BODY>
  8. <H3>CFERROR Example</H3>
  9.  
  10. <P>CFERROR provides the ability to display customized
  11. HTML pages when errors occur. This allows you to
  12. maintain a consistent look and feel within your
  13. application even when errors occur. Note that no CFML
  14. can be displayed in the resulting templates except
  15. for the specialized error variables.
  16. <P>CFTRY/CFCATCH provides a more interactive way to
  17. handle your CF errors within a CF template than CFERROR,
  18. but CFERROR is still a good safeguard against general
  19. errors.
  20. <P>You can also use CFERROR within the Application.cfm
  21. to specify error handling responsibilities for an entire
  22. application.
  23.  
  24. <!--- Example of CFERROR call within a template --->
  25. <!--- <CFERROR TYPE="REQUEST"
  26.                TEMPLATE="request_err.cfm"
  27.                MAILTO="admin@mywebsite.com"> --->
  28.  
  29. <!--- Example of the template to handle this error --->
  30. <!---
  31. <HTML>
  32. <HEAD>
  33.     <TITLE>We're sorry -- An Error Occurred</TITLE>
  34. </HEAD>
  35.  
  36. <BODY>
  37. <UL>
  38. <CFOUTPUT>
  39.     <LI><B>Your Location:</B> #Error.RemoteAddress#
  40.     <LI><B>Your Browser:</B> #Error.Browser#
  41.     <LI><B>Date and Time the Error Occurred:</B> #Error.DateTime#
  42.     <LI><B>Page You Came From:</B> #Error.HTTPReferer#
  43.     <LI><B>Message Content</B>: <BR><HR width=50%><P>#Error.Diagnostics#<HR width=50%><P>
  44.     <LI><B>Please send questions to:</B> <a href="mailto:#Error.MailTo#">#Error.MailTo#</A>
  45. </CFOUTPUT>
  46. </UL>
  47. </BODY>
  48. </HTML>        --->
  49.  
  50. </BODY>
  51. </HTML>       
  52.