0 Replies Latest reply on Aug 4, 2006 12:40 PM by Dennis Knipper

    "Illegal exception table range" preverify error

    Dennis Knipper Newbie

      Hi,

      I encountered the following error:

      Error preverifying class Test
      VERIFIER ERROR Test.open()V:
      Illegal exception table range

      after trying to copy a constructor body to a new method with the following instructions: (final code is the body of the constructor)

      MethodInfo mf = cf.getMethod("");
      mf.setName("open");
      CodeAttribute ca = mf.getCodeAttribute();
      CodeAttribute codeAttribute = new CodeAttribute(ca.getConstPool(), ca.getMaxStack(), ca.getMaxLocals(), finalCode, ca.getExceptionTable());

      It only doesn´t work if in the original constructor includes a try() catch() statement.

      Does anyone has a solution for the problem?

      Thanks a lot in advance

      Regards,

      theamtrix