ColdFusion · Exception

Any Exception (catch-all)

What does Any Exception (catch-all) mean in ColdFusion?

The default type when none is specified on cfcatch — matches every exception ColdFusion throws, regardless of category. Since ColdFusion MX, a type="any" catch no longer has to sit last in a cftry block; the engine finds the best-matching cfcatch among however many are present.

Any Exception (catch-all)Adobe ColdFusion · Lucee

Condition

The default type when none is specified on cfcatch — matches every exception ColdFusion throws, regardless of category. Since ColdFusion MX, a type="any" catch no longer has to sit last in a cftry block; the engine finds the best-matching cfcatch among however many are present.

Fix

Place type="any" as the last cfcatch among siblings so more specific types (database, security, custom) get first chance to match, and use it as a logging safety net rather than a substitute for targeted handling.

Related exception