From: harely <re...@bu...> - 2010-12-15 20:01:30
|
New submission from harely <ha...@il...>: 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 ---------- components: Core messages: 6280 nosy: harely severity: major status: open title: jython hides StackOverflowError from Java code type: behaviour versions: 2.5.2rc _______________________________________ Jython tracker <re...@bu...> <http://bugs.jython.org/issue1687> _______________________________________ |