5 Replies Latest reply on Sep 7, 2007 7:17 PM by Newsgroup_User

    cfscript try/catch in CF8

    jsmcmullen
      I am having an issue in CF8 that I did not see in earlier versions. Consider this code inside a function in a CFC:

      <cfscript>
      var err1 = 0;
      try {
      some code here;
      } catch (Any err1) {
      some code here;
      }
      </cfscript>

      In CF8, I am getting the error "Cannot declare local variable err1 twice" when I try to instantiate the CFC. Of course, I get no error if I get rid of the var err1 = 0 line, but is this thread-safe? (Changing the variable declaration to "var err1 = structtNew() doesn't work either.)