[tcljava-user] checkPendingException with tclblend1.4.1
Brought to you by:
mdejong
From: yuan d. <dh...@gm...> - 2009-08-15 08:38:40
|
hi, I've build the tclblend1.4.1 and tclblend1.3.3 for windows by using msys. I run the following code ok with tclblend1.3.3 but failed with tclblend1.4.1. import tcl.lang.Interp; import tcl.lang.TclException; import tcl.lang.TclInteger; public class StringLengthTest { public static void main(String[] args) { int thestr_len = -1; String thestr = "noggy"; Interp interp = new Interp(); try { interp.eval("puts [info tclversion]"); interp.eval("puts [info library]"); interp.eval("string length \"" + thestr + "\""); thestr_len = TclInteger.get(interp, interp.getResult()); } catch (TclException ex) { int code = ex.getCompletionCode(); System.err.println( "command returned bad error code: " + code); } finally { interp.dispose(); } System.out.println("string length was " + thestr_len); } } The exception from the tclblend1.4.1 is: tcl.lang.TclException: at tcl.lang.Interp.checkPendingException(Interp.java:1372) at tcl.lang.Interp.eval(Interp.java:991) at tcl.lang.Interp.eval(Interp.java:1000) at tcl.lang.BlendExtension.init(BlendExtension.java:68) at tcl.lang.Interp.init(Native Method) at tcl.lang.Interp.<init>(Interp.java:178) at com.dh.cltf.fw.tcl.tclblend.StringLengthTest.main(StringLengthTest.java:12) Exception in thread "main" tcl.lang.TclRuntimeError: tcl.lang.TclException: at tcl.lang.Interp.<init>(Interp.java:181) at com.dh.cltf.fw.tcl.tclblend.StringLengthTest.main(StringLengthTest.java:12) Exception in thread "main" Have you have the same kind of problem? How to resolve it? Thanks very much. Dahui |