SF.net SVN: jython:[7260] trunk/jython/src/org/python/core/Py.java
[email protected] Mon, 21 Mar 2011 23:11:25 +0000
| Newsgroups | gmane.comp.lang.jython.cvs |
|---|---|
| Message-ID | <[email protected]> |
Revision: 7260
http://jython.svn.sourceforge.net/jython/?rev=7260&view=rev
Author: pjenvey
Date: 2011-03-21 23:11:25 +0000 (Mon, 21 Mar 2011)
Log Message:
-----------
better support for Java exceptions in writeUnraisable
Modified Paths:
--------------
trunk/jython/src/org/python/core/Py.java
Modified: trunk/jython/src/org/python/core/Py.java
===================================================================
--- trunk/jython/src/org/python/core/Py.java 2011-03-21 23:10:49 UTC (rev 7259)
+++ trunk/jython/src/org/python/core/Py.java 2011-03-21 23:11:25 UTC (rev 7260)
@@ -1208,15 +1208,10 @@
return buf.toString();
}
- public static void writeUnraisable(Exception exc, PyObject obj) {
- if (exc instanceof PyException) {
- PyException pye = (PyException) exc;
- stderr.println(String.format("Exception %s in %s ignored",
- formatException(pye.type, pye.value, true), obj));
- } else {
- // XXX: this could be better handled
- exc.printStackTrace();
- }
+ public static void writeUnraisable(Throwable unraisable, PyObject obj) {
+ PyException pye = JavaError(unraisable);
+ stderr.println(String.format("Exception %s in %s ignored",
+ formatException(pye.type, pye.value, true), obj));
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar