ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old December 18th, 2003, 06:19 PM
premzero premzero is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Sydney, AU
Posts: 37 premzero User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 26 m 8 sec
Reputation Power: 5
Error handling

I'm having some troubles with handling errors.
First off I'm using a content management system for my CFML pages.

Anyways that shouldn't really matter.
So in the application.cfm file, I have:
Code:
<cferror 
    template="error.cfm"
    mailto="zzz@zzz.com"
    type="Exception"
    exception="ANY"
>


My error.cfm file contains:
Code:
<CFMAIL server="#mailserver#" from="error@zzz.com" to="#Error.MailTo#" subject="Auto Error Report">
Error occured in template: #Error.Template#
At this time: #Error.DateTime#
The query string was: #Error.QueryString#
The referring page was: #Error.HTTPReferrer#
Web browser used: #Error.Browser#

A detailed diagnostic follows:
#Error.Diagnostics#
</cfmail>

<cfoutput>
Sorry, there was an error processing your request for page: #Error.Template##Error.QueryString#
<p>The error has been brought to our attention and will be fixed as soon as possible.
<br/>Sorry for any inconvenience caused.</p>
</cfoutput>


However, on an error, the page refuses to send me an email
display the message. Instead it throws out the error. Do any of
you see anything wrong with this?

Thanks.

Reply With Quote
  #2  
Old December 19th, 2003, 10:37 AM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,689 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 16 h 33 m 51 sec
Reputation Power: 53
Try just doing this:

<cferror type="EXCEPTION" template="error.cfm">

exceptionType is "any" by default, and the mailto doesn't really do anything as far as I know.

Also is the error.cfm file in the same dir as your application.cfm file? Also, can you test out the error.cfm file on its own...I think CF gets nutty if your error template itself has an error in it, it has no choice but to show the raw error.

So not too much help, but I can tell you that we are using a similar technique and it works just fine, so it CAN be done!

Reply With Quote
  #3  
Old December 20th, 2003, 05:23 PM
premzero premzero is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Sydney, AU
Posts: 37 premzero User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 26 m 8 sec
Reputation Power: 5
Thanks kiteless...

Though I just found out that it was indeed the CMS causing
the problem because I couldn't put CF tags on the error page.
There still seems to be more problems. Guess I'll have to figure
it out myself or get some support from the CMS..

Thanks anyways.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Error handling


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT