Skip to main content
Inspiring
March 21, 2011
Question

detect any error with website and dislay my own "error.cfm" page

  • March 21, 2011
  • 7 replies
  • 858 views

Is there a unified way of dealing with any type of error eg. page not found, database related error, and throwing up my own custom error page which simply says "sorry for inconvenience" , etc.. ?

This topic is closed to new replies. Start a new post to keep the conversation going.

7 replies

Owainnorth
Inspiring
March 21, 2011

Take a look at the Application.cfc reference in the docs, it's all in there.

Inspiring
March 21, 2011

Looking at help.adobe.com it mentions

<cfferror  
    template = "template path" 
    type = "exception|validation|request" 
    exception = "exception type" 
    mailTo = "e-mail address">

just to confirm, if I set type = "request" will it catch BOTH exceptions AND validation errors ?

Inspiring
March 21, 2011

Come on mate: try to help yourself occasionally.

What does it say further down the very page you're looking at (which I presume is http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7d29.html):

request: any encountered error.

What does that suggest to you?  I'm not sure there's any more than one way of reading that.

Equally... it wouldn't have taken you very long to actually put this to the test would it?

--

Adam

Inspiring
March 21, 2011

Yep.

Have a look @ the online docs, and within the "Developing CF Applications" section, there's a subsection "Handling Errors".

http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-7fc4.html

Did you check the docs before asking the question?

--

Adam