> I am wondering how I go about designing my own error message
> pages so that when a cf error occurs the system outputs my pre
> designed page to the user rather than it displaying a cf server
> generated message which is totally meaningless to the person
> viewing the internet site.
You have several alternatives if you're using CF 4.5.1:
1. Site-wide error handling (new to CF 4.5.x)
You can specify a single page to which any unhandled error will be
redirected. Within that page, you can put whatever CFML you want. You
specify the page location in CF Administrator.
2. The CFERROR tag (since CF 1.x)
You can put a CFERROR tag with the TYPE="REQUEST" attribute on each page for
which you want to redirect errors. Typically, you'd do this in
application.cfm, of course. The page to which you redirect can't have any
CFML in it, other than the error variables themselves (which are listed in
the documentation). The site-wide error handler will override this, as this
is the most primitive and limited error response.
3. The CFERROR tag with TYPE="EXCEPTION" (new to CF 4.5.x)
You can redirect unhandled exceptions to a specific page, which can have any
CFML code in it that you want, including CFCATCH variables. This is a pretty
nifty option.
4. Exception handling with CFTRY and CFCATCH (new to CF 4.0.x)
You can wrap specific problem code blocks within exception handlers to TRY
the code and CATCH any exceptions. This is an appropriate thing to do when
you have a specific run-time problem with a high likelihood of occurrence,
and when there's something you specifically want to do in response to that
particular problem.
All of these are listed in one place or another within the documentation.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.