|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Cannot declare local variable CFCatch Twice
Code:
Cannot declare local variable CFCATCH twice.
Local variables cannot have the same names as parameters or other local variables.
Error occurred on line 161
159 : <cffunction name="GetLogger" returntype="BatchLogger" output="false">
160 : <cfif NOT isDefined("this.logger")>
161 : <cfset this.logger = CreateObject("component","BatchLogger")>
162 : <cfset this.logger.init(this.ID)>
163 : </cfif>
we recently upgraded to CF8, and this error popped up. lost on what this error even means, as CFCATCH is never declared and is a CF tag? |
|
#2
|
|||
|
|||
|
Since it references line 191, what is happening inside the creation of the BatchLogger?
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian. How to Post a Question in the Forums |
|
#3
|
|||
|
|||
|
i take it you meant line 161 rather than 191
basically, it was a component that would take in data to log into a database. and as i wrote this, i figured out the issue. (no, didnt take me this long to figure it out, so dont make too much fun of me) but just noticed a function took in an argument with the name of "cfcatch" and in the function it did a cftry and catch. dont ask, i wasnt the one who originally coded it. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Cannot declare local variable CFCatch Twice |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|