Skip to content

Instantly share code, notes, and snippets.

@csdy
Last active August 27, 2023 13:22
Show Gist options
  • Save csdy/4689d8e24a395564eb81d5030d410046 to your computer and use it in GitHub Desktop.
Save csdy/4689d8e24a395564eb81d5030d410046 to your computer and use it in GitHub Desktop.
ColdFusion — Robust Exceptions

Enabling Robust Exceptions

Server-Wide Exceptions (VPS Only)

Enabling Exceptions

  • Login to the Windows Control Panel
  • Navigate to Website Settings > IIS Settings > Advanced
  • Change the Error Mode to "Detailed"
  • Click the "Save" button
  • Login to the ColdFusion Administrator
  • Navigate to Debug & Logging > Debug Output Settings
  • Enable the "Enable Robust Exceptions" checkbox
  • Click the "Submit Changes" button

Disabling Exceptions

  • Login to the ColdFusion Administrator
  • Navigate to Debug & Logging > Debug Output Settings
  • Disable the "Enable Robust Exceptions" checkbox
  • Click the "Submit Changes" button
  • Login to the Windows Control Panel
  • Navigate to Website Settings > IIS Settings > Advanced
  • Change the Error Mode to "Detailed Local Only"
  • Click the "Save" button

Per-Application Exceptions

Enabling Exceptions

  • Login to the Windows Control Panel
  • Navigate to Website Settings > IIS Settings > Advanced
  • Change the Error Mode to "Detailed"
  • Click the "Save" button
  • Open the application.cfc file in the application root for editing
  • Add the following line of code to the file between the <cfcomponent> tags:
    <cfset this.enablerobustexception = true />
    
  • Save and close the file

Note: If the application.cfc file does not exist, you will need to create one using the code provided below.

Disabling Exceptions

  • Open the Application.cfc file in the application root for editing
  • Edit the following line of code within the file between the <cfcomponent> tags:
    <cfset this.enablerobustexceptions = false />
    
  • Save and close the file
  • Login to the Windows Control Panel
  • Navigate to Website Settings > IIS Settings > Advanced
  • Change the Error Mode to "Detailed Local Only"
  • Click the "Save" button
<cfcomponent displayname="Application" output="true">
<cfset THIS.Name = "Debugging" />
<cfset this.enablerobustexception = true />
</cfcomponent>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment