Copy link to clipboard
Copied
Hello,
I am having some weird issues with CFTRY/CFCATCH. I am getting an error that says, "Variable ERROR is undefined" when I run the following code. Why isn't my Error Struct available to dump like it normall is?
Var 'test' is not defined so it should throw an error.
<cfoutput>
<cftry>
#trim(test)#
<cfcatch>
<cfdump var="#error#">
</cfcatch>
</cftry>
</cfoutput>
No, I think you are just mixing the two. Error handling pages have always been different than cfcatch.
http://livedocs.adobe.com/coldfusion/8/Tags_d-e_11.html#2022557
Copy link to clipboard
Copied
hmmm
Copy link to clipboard
Copied
You are using the wrong structure name. Dump CFCATCH not ERROR.
Copy link to clipboard
Copied
Did that just change?
All the other tags on our error handler page reference error.something and it works fine. All of a sudden that doesn't work and I need to use cfcatch.something???
Copy link to clipboard
Copied
No, I think you are just mixing the two. Error handling pages have always been different than cfcatch.
http://livedocs.adobe.com/coldfusion/8/Tags_d-e_11.html#2022557
Copy link to clipboard
Copied
That is exactly what I was doing. I was mixing up CFCATCH with CFERROR.
Thank you for setting me straight!!!