I think this thread was discussed before, and you can't get the variables 
scope in onError or with cferror.

You can use cfthrow to set specific messages so you know where the error is 
coming from:
<cfif error causing condition 1>
    <cfsavecontent variable="query1">
       <cfdump var="#myquery#">
    </cfsavecontent>
    <cfthrow message="Code block 1 has failed because of error causing 
condition 1. #query1#">
</cfif>

That savecontent part I haven't tested but it should work if you want to 
dump the query.

This is not as robust as being able to use onError, but it does allow you to 
do some dumping at the time of your error.


-- Josh


----- Original Message ----- 
From: "Brad Wood" <[EMAIL PROTECTED]>
To: "CF-Talk" <[email protected]>
Sent: Monday, June 11, 2007 7:50 AM
Subject: RE: Finding current queries


>I think I see what you are saying now.  You want to examine the query
> objects in memory for that the specific request which errored at the
> time it errors, but you can't access the variables scope in the error
> logging code.  I know that I reference form, url, server, client, and
> some others, but I can't say that I have referenced the variables scope
> before. I would have try mess around and try it.  I wonder if you have
> to do something special like caller.
>
> How are you trapping the errors?  Cfcatch, or onerror()?
>
> -----Original Message-----
> From: Claude Schneegans [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 11, 2007 8:11 AM
> To: CF-Talk
> Subject: Re: Finding current queries
>
> >><cfoutput>
>
> <cfloop collection="#variables#" item="i">
> <cfif isquery(variables[i])>
> #i#: #variables[i].recordcount# records<br>
> </cfif>
> </cfloop>
> </cfoutput>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
CF 8 – Scorpio beta now available, 
easily build great internet experiences – Try it now on Labs
http://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_adobecf8_beta

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

Reply via email to