I've been working on a error handling application and ran into an issue. I could not pass along the CFCATCH scope as a struct as an argument. I could do it for any other scope. Testing revealed a weird oddity where ColdFusion does not see the CFCATCH scope as a struct.

Try this code

view plain print about
1<cftry>
2    <cfthrow type="Application" message="This is a test error">
3    <cfcatch type="any">
4        <cfoutput>#isStruct(cfcatch)#</cfoutput>
5        <cfset variables.copyOfCactch = duplicate(cfcatch) />
6        <cfdump expand="true" label="cfcatch" var="#cfcatch#" />
7        <cfoutput>#isStruct(variables.copyOfCactch)#</cfoutput>
8        <cfdump expand="true" label="variables.copyOfCactch" var="#variables.copyOfCactch#" />
9    </cfcatch>
10</cftry>

and this is what it returns:

NO YES

(plus the related dumps)