Skip to main content
Participating Frequently
January 23, 2008
Question

error page

  • January 23, 2008
  • 1 reply
  • 186 views
When my hosting sql connection goes down, my pages display an error showing my database connection. How can I approach my error page or customize it so that each time my hosting have issue, my database connection does not goes public.

    This topic has been closed for replies.

    1 reply

    Inspiring
    January 23, 2008
    WoWCFXML wrote:
    > When my hosting sql connection goes down, my pages display an error showing my
    > database connection. How can I approach my error page or customize it so that
    > each time my hosting have issue, my database connection does not goes public.

    You can either use <cftry><cfcatch> blocks around the individual
    <cfquery...> tags and|or the <cferror...> tag and|or the 'onError' event
    function of an Application.cfc file to provide alternate output in case
    of errors being thrown.

    You could also incorporate the 'Site Wide Exception Handler' setting in
    the Administrator if your plan with your hosting provider allows for this.

    The CF documentation has a large and detailed section of the exception
    handling options and capabilities of ColdFusion. If you don't have a
    copy locally, the internet has many.