Menu

#1868 try catch in NewExpr

Javassist 2.4.0
closed-fixed
Javassist (12)
5
2004-07-08
2004-06-04
No

javassistV2.6.jar or javassistV3.0b.jar the same results:

Actualy I wanted to catch exceptions in during Object
creation
So I did:

public class NewCodeConverter extends ExprEditor {

public void edit(NewExpr expr) throws
CannotCompileException {
StringBuffer code = new StringBuffer(300);
code.append("{ try ");
code.append("{ $_ = $proceed($$); }");
code.append("catch (OutOfMemoryError e) { .. }");
expr.replace(code.toString());
}
}

but during execution I get:
Exception in thread "main" java.lang.VerifyError:
method: my_getmem signature: (I)V) Inconsistent
stack height 0 != 2

everything works fine without try and catch

Discussion

  • Shigeru Chiba

    Shigeru Chiba - 2004-06-05

    Logged In: YES
    user_id=388745

    This bug has been fixed.
    See the forum for details.

     
  • Shigeru Chiba

    Shigeru Chiba - 2004-07-08
    • status: open --> closed-fixed
     

Log in to post a comment.