From: Finn B. <bc...@us...> - 2000-12-12 21:27:38
|
Update of /cvsroot/jython/jython/org/python/core In directory slayer.i.sourceforge.net:/tmp/cvs-serv5941/core Modified Files: Py.java Log Message: Fix bug 122838. A traceback object is also created when catching an exception in a try: finally: statement. Index: Py.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/Py.java,v retrieving revision 2.26 retrieving revision 2.27 diff -C2 -r2.26 -r2.27 *** Py.java 2000/11/17 21:23:42 2.26 --- Py.java 2000/12/12 21:27:31 2.27 *************** *** 925,928 **** --- 925,938 ---- } + /* Helpers to implement finally clauses */ + public static void addTraceback(Throwable t, PyFrame frame) { + PyException e = Py.JavaError(t); + + //Add another traceback object to the exception if needed + if (e.traceback.tb_frame != frame) { + e.traceback = new PyTraceback(e.traceback); + } + } + /* Helpers to implement except clauses */ public static PyException setException(Throwable t, PyFrame frame) { |