Skip to main content
September 29, 2008
Question

Doubt with <cferror>

  • September 29, 2008
  • 1 reply
  • 307 views
While reading the CFMX7 study guide, I found a statement that says that the template mentioned in the <cferror> tag with type="REQUEST" is called in case of any errors on the page including syntax errors.

Is this statement correct with reference to the Syntax error part? When I tried running my application following the same example mentioned in the book i.e. trying to execute a <cfquery> without a datasource attribute, I get the CF error page and not the error page specified in the <cferror> tag.

For runtime errors, the behaviour is expected but for Syntax errors, this is kinda confusing.

Please throw more light on this in case my understanding is not correct/complete about <cferror>

Regards
Dhrupadh
This topic has been closed for replies.

1 reply

Inspiring
September 30, 2008
Hi,

I think the CF's behaviour would be the same towards the runtime as well as the syntax errors.

And if you need to handled that and want the user to have redirected to another page you need to try out the site wide error handler.