Message6280
When Java code invoked from Jython causes a StackOverflowError, Jython hides the original error. The PyException that Jython throws does not refer to the original StackOverflowError as its cause and its error message suggests that it was the Python stack that overflowed.
example:
import org.python.util.PythonInterpreter;
public class Main {
public static void foo() {
// cause a StackOverflowError
foo();
//// When throwing a different Error, jython handles it fine
//throw new AssertionError();
}
public static void main(String[] args) {
PythonInterpreter interpreter = new PythonInterpreter();
interpreter.exec(
"from jythonstack import Main\n" +
"Main.foo()");
}
}
This produces:
init: Bootstrapping class not in Py.BOOTSTRAP_TYPES[class=class org.python.core.PyStringMap]
Exception in thread "main" Traceback (most recent call last):
File "<string>", line 2, in <module>
RuntimeError: maximum recursion depth exceeded |
|
Date |
User |
Action |
Args |
2010-12-15 20:01:24 | harely | set | recipients:
+ harely |
2010-12-15 20:01:24 | harely | set | messageid: <1292443284.35.0.779614887835.issue1687@psf.upfronthosting.co.za> |
2010-12-15 20:01:24 | harely | link | issue1687 messages |
2010-12-15 20:01:24 | harely | create | |
|