CFCATCH accepts any attribute?

As I prepare my final bits of code for my MAX presentation (on CFFEED), I incorporated Rupesh Kumar's blog entry on cffeed and gzip compression problems. I noticed something odd though in his code example:

<cfcatch any>

Normally that line is written as:

<cfcatch type="any">

I then played around with this. At first I thought that maybe cfcatch was treating what it saw as a shortcut for type=. I tried this:

<cfcatch application>

And it worked fine. The code Rupesh had written through an Application type error. But then I tried something completely different:

<cfcatch parishilton="ismyhero">

And lo and behold - it worked as well. So I guess cfcatch simply ignores unknown attributes, unlike most of the rest of the language. Rupesh's code worked because the type attribute defaults to any. It was like he wrote:

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA