you can test out the exception that is being thrown by doing a <cfdump var="#cfcatch#" >
your best bet is to do an isObject() or isStruct() on cfcatch to determine its nature.
Pat
Eugene Gorman wrote:
Hi,
We have change the server running our site from cf4.5 to MX, the following code use to work now we get the following error
The Coldfusion function [StructCopy] is not supported on an object of type [coldfusion.runtime.ExceptionScope].
For Example: XML objects can be operated on by a subset of the Struct and Array functions but not all.
The code gets a list of databases and the tries to make an update to all of them. This part works. This part of the code is used to catch any errors and report the databases that unsuccessful in being updated
<cfcatch type="Any"> <cfset Variables.Status[ClientID] = StructCopy(CFCATCH)> <!--- Add company name. ---> <cfset Variables.Status[ClientID].CompanyName = "#CompanyName#"> </cfcatch>
Here is the code
<!--- Initialise the status structure. --->
<cfset Variables.Status = StructNew()>
<!--- Update the databases. --->
<cfloop query="Clients">
<!--- Store case-nice datasource name. --->
<cfset Variables.Status[ClientID] = "#CompanyName#">
<cftransaction>
<cftry>
<cfquery name="changeDB" datasource="#DatasourceName#" dbtype="ODBC">
#PreserveSingleQuotes(Attributes.SQL)#
</cfquery>
<cfcatch type="Any">
<cfset Variables.Status[ClientID] = StructCopy(CFCATCH)>
<!--- Add company name. --->
<cfset Variables.Status[ClientID].CompanyName = "#CompanyName#">
</cfcatch>
</cftry>
</cftransaction>
</cfloop>
If any one can help me I would be very happy.
Best Regards, Eugene Gorman
---
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/
