CFCatch Not a Struct

I ran into an issue today where passing a cfcatch between methods returned a "not a struct" error. A quick Google search and I found a timely article on HJCotton.net that described it exactly.

3 responses to “CFCatch Not a Struct”

  1. Ben NadelBen Nadel Says:
    I also ran into this recently in the OnError() event handler in Application.cfc. I put the Exception CFArgument type as "struct" and it thew the type error. Switch to "any" and it worked.
  2. Aaron WestAaron West Says:
    As far as I know CFCATCH has not been a struct since the introduction of ColdFusion MX (version 6). It doesn't make any sense to me /why/ CFCATCH isn't a struct though; it really should be in my opinion. But, maybe I'm missing something.

    Aaron West Says:
    As far as I know CFCATCH has not been a struct since the introduction of ColdFusion MX (version 6). It doesn't make any sense to me /why/ CFCATCH isn't a struct though; it really should be in my opinion. But, maybe I'm missing something.

  3. Daniel ShortDaniel Short Says:
    Agreed, especially since it identifies itself as a Struct when you dump it...

Leave a Reply

Leave this field empty:

Powered by Mango Blog.