> I'm trying to implement some site-wide error handling using
> cferror, and it's really being a PITA.
>
> In my application.cfm file, at the very end, I have:
>
> <cferror type="EXCEPTION" template="/error/error.cfm" exception="ANY">
> <cferror type="REQUEST" template="/error/404.cfm">
>
> error.cfm and 404.cfm are both in /error/, I have verified
> this. After I made this change, I restarted services and then
> loaded a test page with an error in it. Instead, I got the
> standard exception error handling page (not my page). After
> about 30 minutes of screwing around, I went into CFAdmin and
> registered /error/error.cfm as the default error handler, and
> lo and behold, it worked. I then went in and removed that
> setting from CFAdmin and it still worked. Has anyone else seen
> this behavior?

No, I haven't seen that specific behavior. I have seen all sorts of odd
behavior that was only resolved after restarting the CF service, oddly
enough. It's worth pointing out that CFERROR TYPE="EXCEPTION" won't catch
every possible error, only things that CF considers to be runtime
exceptions.

I assume that you have a directory called "error" in your web root, and that
you have the root slash "/" mapped in CF to your web root, or that you have
a CF mapping called "/error" pointing to your error directory? If I recall
correctly, the CFERROR tags resolve their paths the same way that CFINCLUDE
and CFMODULE do.

> Second problem is the request error page, /error/404.cfm  
> That page is being loaded as expected when I force a request
> error, but I cannot for the life of me get the error variables
> to display as they should. It is my understanding from
> http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-p2
> 4.htm#wp2022557 that I can display a number of variables, but
> cannot otherwise use any CF tags.

That is also my understanding, and has been my experience. I've never had an
error page with a name that consists of a number; perhaps that's the
problem. (This is purely a shot in the dark.)

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
voice: (202) 797-5496
fax: (202) 797-5444
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to