From: <nr...@us...> - 2009-07-23 06:31:58
|
Revision: 6570 http://jython.svn.sourceforge.net/jython/?rev=6570&view=rev Author: nriley Date: 2009-07-23 06:31:56 +0000 (Thu, 23 Jul 2009) Log Message: ----------- Restore some accidentally-reverted changes from the JSR 223 merge. Modified Paths: -------------- trunk/jython/src/org/python/core/Py.java trunk/jython/src/org/python/core/PyFinalizableInstance.java Modified: trunk/jython/src/org/python/core/Py.java =================================================================== --- trunk/jython/src/org/python/core/Py.java 2009-07-23 05:16:14 UTC (rev 6569) +++ trunk/jython/src/org/python/core/Py.java 2009-07-23 06:31:56 UTC (rev 6570) @@ -1027,7 +1027,7 @@ stderr.println(getStackTrace((Throwable) javaError)); } } - stderr.println(formatException(type, value, tb)); + stderr.println(formatException(type, value)); } /** @@ -1080,7 +1080,7 @@ out.print("^\n"); } - static String formatException(PyObject type, PyObject value, PyObject tb) { + public static String formatException(PyObject type, PyObject value) { StringBuilder buf = new StringBuilder(); if (PyException.isExceptionClass(type)) { @@ -1106,7 +1106,7 @@ } else { buf.append(type.__str__()); } - if (value != Py.None) { + if (value != null && value != Py.None) { // only print colon if the str() of the object is not the empty string PyObject s = value.__str__(); if (!(s instanceof PyString) || s.__len__() != 0) { Modified: trunk/jython/src/org/python/core/PyFinalizableInstance.java =================================================================== --- trunk/jython/src/org/python/core/PyFinalizableInstance.java 2009-07-23 05:16:14 UTC (rev 6569) +++ trunk/jython/src/org/python/core/PyFinalizableInstance.java 2009-07-23 06:31:56 UTC (rev 6570) @@ -31,7 +31,7 @@ } catch (PyException e) { ; } Py.stderr.println("Exception " + - Py.formatException(exc.type, exc.value, exc.traceback) + + Py.formatException(exc.type, exc.value) + " in " + method + " ignored"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |