Copy link to clipboard
Copied
I am trying to configure a site-wider error handler and it doesn't seem to work.. The template is created under one of my sites, i am pointing to it in the CF admin, but it keeps saying this error: "The file specified as the site wide error handler does not exist. The default error handler will be used until a replacement is created."
I have checked it and made sure the file is there and it keeps saying it doesn't exist. Has anyone else ran into this issue?
Copy link to clipboard
Copied
Check the file permissions on the error handler file. Also, keep in mind that the permissions need to be relevent to the username used to RUN the ColdFusion server. To test this, but not recommended for production use, give everyone full access to the error handler file long enough to test the page. If that works, apply your premissions very selectively to that file.
Copy link to clipboard
Copied
This is a common problem because many do not realize the ColdFusion may not be looking at the same "site root" as the web server. In a basic configuration, it might, but often ColdFusion is working with two or more web sites, each with their own site root and it can not show prefference to one or the other.
YOU can tell it to give preference to a specific site root by defining a mapping to the backslash ("/") character. Or you can put your site wide handler in ColdFusion's site root. Where that is depends on which flavor of CF you have configured, stand-alone, multi-home or J2EE.
On my multi-home version it is "C:/JRun4/servers/cfusion/cfusion-ear/cfusion-war/"
Copy link to clipboard
Copied
Wow, thank you that was exactly what i needed. One more question though, how could i get it to email me with the error information everytime that page gets loaded? Is this possible?
Copy link to clipboard
Copied
Sure it is possible. The sitewide error template can run any, or all, CFML code. You can easily have it include a <cfmail...> tag that mails you all the gory details about the exception that was just thrown.
Copy link to clipboard
Copied
Where can i find what variables to use for diagnostic information?
Copy link to clipboard
Copied
I always like to start with the documentation:
http://livedocs.adobe.com/coldfusion/8/htmldocs/Errors_01.html
Reading that you would learn about the error structure.
<cfdump var="#error#">
Copy link to clipboard
Copied
Thanks for the info, do you know where i could possibly find a sample site-wide missing template and a site-wide error template?