I'm trying to learn error handling in ColdFusion and am having a problem not being able to catch a what the default error handler calls an "invalid CFML construct" with cfcatch. This example has a ] missing in the loop. I was hoping cfcatch with type="any" would get it. What am I doing wrong?
<html>
<head>
<title>
</title>
</head>
<body>
<!---
<cferror type="exception" template="qcfe.cfm">
--->
<cftry>
<cfquery name="qerr" datasource="#dso#">
select code,descriptor
from tblnewtax
order by code
</cfquery>
<cfset upto=qerr.recordcount>
<cfif upto gt 0>
<cfoutput>
<cfloop index="ii" from="1" to="#upto#">
#ii#,#qerr.code[ii]#,#qerr.descriptor[ii#
<br>
</cfloop>
</cfoutput>
</cfif>
<cfcatch type="database">
<cfset errdbf=true>
dbf error
<cfabort>
</cfcatch>
<cfcatch type="any">
other error
<cfabort>
</cfcatch>
</cftry>
</body>
</html>
<html>
<head>
<title>
</title>
</head>
<body>
<!---
<cferror type="exception" template="qcfe.cfm">
--->
<cftry>
<cfquery name="qerr" datasource="#dso#">
select code,descriptor
from tblnewtax
order by code
</cfquery>
<cfset upto=qerr.recordcount>
<cfif upto gt 0>
<cfoutput>
<cfloop index="ii" from="1" to="#upto#">
#ii#,#qerr.code[ii]#,#qerr.descriptor[ii#
<br>
</cfloop>
</cfoutput>
</cfif>
<cfcatch type="database">
<cfset errdbf=true>
dbf error
<cfabort>
</cfcatch>
<cfcatch type="any">
other error
<cfabort>
</cfcatch>
</cftry>
</body>
</html>