One common things folks may do when using try/catch in CFML is to simply cfdump the CFCATCH object. I know that I, probably like most folks, assumed that the CFCATCH variable was a structure. It looks like a structure (with values like cfcatch.tagcontext) and most x.y things in CF are structures, so it was probably a safe assumption. However, there are times when dumping cfcatch will not result in a nice little struct. Instead you get something like this:
This was generated from the following code:
<cfset x = structNew()>
<cfoutput>#x.y#</cfoutput>
<cfcatch>
<cfdump var="#cfcatch#">
</cfcatch>
</cftry>
What is interesting is that it seems to be only a specific type of error: coldfusion.runtime.UndefinedElementException. If you change the code above, let's say to foo() (a udf that does not exist), the dump works correctly.
So what to do? You could switch to a more manual approach:
<table>
<tr>
<td>Type:</td>
<td>#cfcatch.type#</td>
</tr>
<tr>
<td>Message:</td>
<td>#cfcatch.message#</td>
</tr>
<tr>
<td>Detail:</td>
<td>#cfcatch.detail#</td>
</tr>
</table>
</cfoutput>
This works nicely, although for the original error, the detail row is blank. You could also add more detail, like the tag context, etc.
So, this was discussed on cf-guru quite a bit. Sean Corfield made the point that the documentation does not explicitly state that cfcatch is a structure. However, I think it's current behaviour would be considered a bug. I'd be willing to bet that this particular CF exception has a simple bug in it that makes it not work quite well with cfdump. Either way it is something to keep in mind.