I am trying to leverage CFTRY/CFCATCH with some CFREPORT calls.  The CFCATCH 
block seems to catch any errors in the CFM page, but an error in the CFR does 
not seem to trigger the CFCATCH block in the calling page.

Any thoughts?

An example of what I'm doing is below.

Thanks,

Greg

------------------------------------------------------------- 

<cftry>

.... bunch of code here ...

<cfheader name="Content-Disposition" value="#attributes.content_disposition#; 
filename=#replacenocase(attributes.reportname," ","_", 
"all")#.#attributes.extension#">
        
<cfreport format="#attributes.format#" template="reports/#attributes.template#" 
name="myreport">
     <!--- loop through the form collection / submit values as reportparams --->
     <cfloop collection="#form#" item="key">
          <cfreportparam name="#key#" value="#form[key]#">
     </cfloop>
</cfreport>
        
<cfcontent variable="#myreport#" type="#attributes.mimetype#" reset="Yes">

<cfcatch type="Any">
     <p>Error!  Try again.</p>
     <cfabort>
</cfcatch>

</cftry>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273990
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