Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Site-Wide Error Handler

Guest
Jul 02, 2009 Jul 02, 2009

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?

3.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 02, 2009 Jul 02, 2009

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jul 02, 2009 Jul 02, 2009

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/"

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 03, 2009 Jul 03, 2009

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jul 03, 2009 Jul 03, 2009

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 06, 2009 Jul 06, 2009

Where can i find what variables to use for diagnostic information?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jul 06, 2009 Jul 06, 2009

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#">
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jul 06, 2009 Jul 06, 2009
LATEST

Thanks for the info, do you know where i could possibly find a sample site-wide missing template and a site-wide error template?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources