RE: Cannot declare local variable cfcatch twice
Can we see your code? -Original Message- From: SANJEEV SINGLA [mailto:planetsanj...@gmail.com] Sent: 19 August 2009 07:43 To: cf-talk Subject: Cannot declare local variable cfcatch twice Hi All, I migrated my CFMX6.1 application to CF8 on my local dev machine and getting the following error. Cannot declare local variable cfcatch twice. Local variables cannot have the same names as parameters or other local variables. Please let me know how it can be resolved. Thanks! Sanjeev ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325537 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Cannot declare local variable cfcatch twice
The code would certainly help pinpoint exactly where the issue lies, but as the error message indicates, it is caused by the fact that somewhere in your code a variable is declared twice within a function. This can be caused by several factors. Here are a couple of examples that will do it. Ex. 1 cffunction name=foo cfargument name=bar / cfset var bar = / /cffunction Ex. 2 cffunction name=foo cfscript var err = ; try { // code here } catch (any err) { } /cfscript /cffunction ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325543 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: Cannot declare local variable cfcatch twice
This question was cross posted at the same time and answered on cfaussies' group almost immediately. But was not followed through with. On Wed, Aug 19, 2009 at 3:04 PM, Matt Quackenbush quackfu...@gmail.comwrote: The code would certainly help pinpoint exactly where the issue lies, but as the error message indicates, it is caused by the fact that somewhere in your code a variable is declared twice within a function. This can be caused by several factors. Here are a couple of examples that will do it. Ex. 1 cffunction name=foo cfargument name=bar / cfset var bar = / /cffunction Ex. 2 cffunction name=foo cfscript var err = ; try { // code here } catch (any err) { } /cfscript /cffunction ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325544 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4