From: Finn B. <bc...@us...> - 2001-02-25 16:44:48
|
Update of /cvsroot/jython/jython/org/python/core In directory usw-pr-cvs1:/tmp/cvs-serv997 Modified Files: PyException.java PySyntaxError.java Log Message: Added javadoc comments. Index: PyException.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PyException.java,v retrieving revision 2.3 retrieving revision 2.4 diff -C2 -r2.3 -r2.4 *** PyException.java 2001/02/01 16:41:10 2.3 --- PyException.java 2001/02/25 16:45:59 2.4 *************** *** 3,10 **** --- 3,28 ---- import java.io.*; + /** + * A wrapper for all python exception. Note that the wellknown + * python exception are <b>not</b> subclasses of PyException. + * Instead the python exception class is stored in the + * <code>type</code> field and value or class instance is stored + * in the <code>value</code> field. + */ + public class PyException extends RuntimeException { + /** + * The python exception class (for class exception) or + * identifier (for string exception). + */ public PyObject type; + + /** + * The exception instance (for class exception) or exception + * value (for string exception). + */ public PyObject value = Py.None; + public PyTraceback traceback; private boolean instantiated=false; Index: PySyntaxError.java =================================================================== RCS file: /cvsroot/jython/jython/org/python/core/PySyntaxError.java,v retrieving revision 2.2 retrieving revision 2.3 diff -C2 -r2.2 -r2.3 *** PySyntaxError.java 2001/02/01 16:41:11 2.2 --- PySyntaxError.java 2001/02/25 16:45:59 2.3 *************** *** 2,5 **** --- 2,13 ---- package org.python.core; + /** + * A convience class for creating Syntax errors. Note that the + * syntax error is still taken from Py.SyntaxError. + * <p> + * Generally subclassing from PyException is not the right way + * of creating new exception classes. + */ + public class PySyntaxError extends PyException { int lineno, column; |