From: <fwi...@us...> - 2008-10-11 20:54:55
|
Revision: 5373 http://jython.svn.sourceforge.net/jython/?rev=5373&view=rev Author: fwierzbicki Date: 2008-10-11 20:54:47 +0000 (Sat, 11 Oct 2008) Log Message: ----------- Throw a Python exception for two internal compiler errors that where just printing a less useful error message and going on to an NPE. Modified Paths: -------------- trunk/jython/src/org/python/compiler/CodeCompiler.java Modified: trunk/jython/src/org/python/compiler/CodeCompiler.java =================================================================== --- trunk/jython/src/org/python/compiler/CodeCompiler.java 2008-10-11 06:42:35 UTC (rev 5372) +++ trunk/jython/src/org/python/compiler/CodeCompiler.java 2008-10-11 20:54:47 UTC (rev 5373) @@ -1966,7 +1966,7 @@ code.invokevirtual("org/python/core/PyFrame", "setlocal", "(" + $str + $pyObj + ")V"); } else { if (syminf == null) { - System.err.println("internal compiler error: "+node); + throw new ParseException("internal compiler error", node); } if ((syminf.flags&ScopeInfo.CELL) != 0) { code.iconst(syminf.env_index); @@ -1991,7 +1991,7 @@ code.invokevirtual("org/python/core/PyFrame", "dellocal", "(" + $str + ")V"); } else { if (syminf == null) { - System.err.println("internal compiler error: "+node); + throw new ParseException("internal compiler error", node); } if ((syminf.flags&ScopeInfo.CELL) != 0) { module.error("can not delete variable '"+name+ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |