Jul 30 2009
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.
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.
Jul 30, 2009 at 11:26 AM 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.
Jul 30, 2009 at 4:49 PM 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:
Jul 30, 2009 at 4:49 PM 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.
Jul 31, 2009 at 6:52 AM Agreed, especially since it identifies itself as a Struct when you dump it...
May 25, 2011 at 6:32 PM Just ran across this issue in CF9, but figured out a workaround. Use duplicate() to make a copy of the CFCATCH scope and you can use that copy as a struct. Weird why the original CFCATCH still doesn't identify as a struct, but this got me around an issue.