Skip to main content
April 28, 2010
Question

cfcatch issue

  • April 28, 2010
  • 1 reply
  • 446 views

hi all-

I am using try/catch around a cfquery, and when I use #cfcatch.SQl# within cfcatch, I get an error saying sql is undefined
in cfcatch. The same happens with #cfcatch.where#. Everything is fine with #cfcatch.detail#, #cfcatch.message#.

I have been working with #cfcatch.sql# and #cfcatch.where# with no issues until today. Can any one let me know what could be
the issue

This topic has been closed for replies.

1 reply

Inspiring
April 28, 2010

Is it a DB exception being throw?  I can't say I've ever used either of cfcatch.sql or cfcatch.where (didn't even know they existed until now, so cheers for mentioning them!), but by my reading of the docs, those values are only available with DB exceptions.  So if you simply have a logic error which causes an exception in your code, be it within <cfquery> tags or not, they you'll not get those values available.  But like I said, this is speculation based on my reading of the docs, not any actual exposure to the situation.

http://livedocs.adobe.com/coldfusion/8/htmldocs/Tags_c_04.html

--

Adam