1073 Syntax error: expecting a catch or a finally clause.

You have a try block but do not have the catch block or finally clause after it.

Incorrect

try {
   // your code
}

// next set of code here



Correct

try {
   // your code
}
catch (errorEvent:Error) {
   // your code didn't work code
}

// next set of code here



Correct

try {
   // your code
}
catch (errorEvent:Error) {
   // your code didn't work code
}
finally {
   // whether your code worked or not code
}

// next set of code here

About Judah

Please note in the comments if this has helped you or not.
This entry was posted in Compiler. Bookmark the permalink.

4 Responses to 1073 Syntax error: expecting a catch or a finally clause.

  1. miguel says:
    try
    {
    
    }
    this.bvMC.removeEventListener(BookViewer.VIEWER_READY, this.ready);
    
  2. Boy says:

    I get an error on line 382 wich is the one that says “hip” it a catch or finally clause error but I don’t know how to fix it

     
    
    catch (e:Error)
                {
                    try
                    {
                    }
                    AssetClass = world.getClass(strSkinLinkage + strGender + "Hip") as Class;
                    mcChar.hip.removeChildAt(0);
                    mcChar.hip.addChild(new AssetClass);
                }
                catch (e:Error)
                {
    • Judah says:

      You have two catch blocks but only one try block. In the “try” block you have now your code is outside of it. That code needs to be inside of the brackets or inside a catch block after it.

      try {
         trace("Trying some code");
         AssetClass = world.getClass(strSkinLinkage + strGender + "Hip") as Class;
         mcChar.hip.removeChildAt(0);
         mcChar.hip.addChild(new AssetClass);
         trace("It worked!");
      }
      catch (e:Error)
      {
         trace("It didn't work!");
      }

Leave a Reply

Your email address will not be published. Required fields are marked *

Highlight your code before posting code:

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="">