You will only get an error from <cfhttp> if there is something wrong with the tag itself (like missing mandatory parameters - for example).
You wont get any errors trapped by that <cftry> on the page that is called in the <cfhttp>. The two are completely isolated. CF can't trap errors in another CF page (only the page itself can trap errors). If the page was a PHP page you were calling, you would not expect CF to trap those errors.
As was suggested, if you are calling a page on your own server in the same filespace then using <cfinclude> and not <cfhttp>. Then you can wrap that up in <cftry> and it will work (if there are errors).
<cfhttp> creates a cfhttp variable (check the CF docs) that contains details about any formal error that has happened during the call - including the statusCode that the page returned (CF should return an error statusCode if there was an error on the page). NOTE: the "errorDetail" is detail about the HTTP error - not the CF error (you can only get that by parsing what comes back from the page).
As far as calling other pages that use URL/FORM variables - these are all available to <cfinclude> pages (they become part of your main page). If those pages have <html></html> wrappers in them, then you have to rethink how all the pages are built and place the content in a "reusable" area (either in other files - which you can also <cfinclude> or in a database).
I.E. a content management system.
Regards,
Gary
On 6/30/05, Scott Thornton <[EMAIL PROTECTED]> wrote:
Hi,
I am calling a page :
<CFTRY>
<cfhttp
url = ""
method = "get">
</cfhttp>
<CFCATCH TYPE="ANY">
<CFFILE action="">blah blah blah
</cfifle>
</CFCATCH>
</CFTRY>
and have deliberately changed a query so that it would cause an error on somepage.cfm.
The problem is, there is no error being caught. Is what I am trying to do possible???
Secondly, if anyone knows a better method than cfhttp for calling ( kinda like including) other cf pages that use URL var, Id like to hear it.
Scott Thornton, Programmer
Application Development
Information Services and Telecommunications
Hunter-New England Area Health Service
Phone RNH +61 2 49236078
Fax +61 2 49236076
[EMAIL PROTECTED]
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/
--- You are currently subscribed to cfaussie as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
