Just thought I'd pass along an interesting difference I found in CFMX
today with error templates since I finally have it in a production
setting.  Its probably already been covered somewhere, but it can't hurt
to share.

If multihoming on a server, you will want to create a virtual directory
in the CF Administrator to somewhere that your error templates are
located.  Otherwise they will not work as you would expect them to.  If
your error template depends on anything from a <cfapplication> tag or
something else such as that in Application.cfm/OnRequestEnd.cfm AND the
error handler is not in the same directory as those files, you'll need
to <cfinclude> them manually.  They are not ran during the error handler
request if they reside in a different directory (such as if they further
up the directory tree.. normally they would be ran).  Be sure to wrap
the include(s) in <cftry><cfcatch> tags (obviously).

Secondly, if a page cannot be compiled because of something like a
syntax error, it will not use the error template and will dump a regular
error message to anyone who hits that page.  So if you're depending on
some sort of mechanism in your error template to log/report errors,
please make sure to check the application log for errors in pages that
can't be compiled (of course you should already be checking it
anyhow...).

Hopefully someone will find this useful.

- Brandon

--------------------------------------
http://booms.net
http://spooled.net

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

Reply via email to