> I always thought any error generated can be cfdump'd by dumping
> cfcatch obj. Every now and then I get [unknown type] when I dump
> cfcatch and that always stumped me. However, when I output 
> cfcatch.Message and cfcatch.Detail, they always work. What am I
> missing?? I see it mostly on CFMX

There was a problem with some older versions of MX (I'm using 8 now) in
which cfcatch objects weren't always ... well they weren't always the
same kind of object I don't think... and occasionally the object would
"misbehave" like you're describing. 

It happened to me with such frequency that I actually created a function
that I shared with the community and also added into my open-source
libraries for ensuring that the cfcatch object would behave like a
structure the way it's supposed to. 

It's not a terribly complicated technique, but it's a pain to have to
always remember to wrap any caught error with that function and given
that I believe the problem has been resolved with more recent versions
(because I haven't been very faithful about applying my solution but
haven't been seeing those errors in a while), I removed the function
from my framework library last week or so... So it's kind of ironic to
me that you ask about this today, because I hadn't thought about this
problem in a while. :) 

Anyway, this was my solution: 

<cfset copy = structNew() />
<cfset structAppend(copy,cfcatch,true) />
<cfset cfcatch = copy />

Don't ask me why structAppend worked when attempts to reference the keys
sometimes produced the "is not a structure" error. Maybe they were using
strict-typing. ;) 

-- 
s. isaac dealey  ^  new epoch
 isn't it time for a change? 
     ph: 781.769.0723

http://onTap.riaforge.org/blog



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309186
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to