Skip to content

Instantly share code, notes, and snippets.

@adamcameron
Last active September 7, 2021 20:56
Show Gist options
  • Save adamcameron/0b01a8b62b00076d07ad56d3fa6189ab to your computer and use it in GitHub Desktop.
Save adamcameron/0b01a8b62b00076d07ad56d3fa6189ab to your computer and use it in GitHub Desktop.
Demonstrating onError catching compilation errors
component {
function onError(exception) {
writeOutput("Message: #exception.message#<br>")
writeOutput("Type: #exception.type#<br>")
writeOutput("Detail: #exception.detail#<br>")
abort
}
}
<cfset emailname = len(ediDetails.firstname) ? ' ' & ediDetails.firstname : emailname = ''>
The web site you are accessing has experienced an unexpected error.
Please contact the website administrator.
The following information is meant for the website developer for debugging purposes.
Error Occurred While Processing Request
Invalid CFML construct found on line 1 at column 87.
ColdFusion was looking at the following text:
=
The CFML compiler was processing:
A cfset tag beginning on line 1, column 2.
<cfinclude template="./brokenInclude.cfm">
Message: Invalid CFML construct found on line 1 at column 87.
Type: Template
Detail: ColdFusion was looking at the following text:
=
The CFML compiler was processing:
A cfset tag beginning on line 1, column 2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment