org.python.core
Class PyException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byorg.python.core.PyException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
PySyntaxError

public class PyException
extends java.lang.RuntimeException

A wrapper for all python exception. Note that the wellknown python exception are not subclasses of PyException. Instead the python exception class is stored in the type field and value or class instance is stored in the value field.

See Also:
Serialized Form

Field Summary
 PyTraceback traceback
           
 PyObject type
          The python exception class (for class exception) or identifier (for string exception).
 PyObject value
          The exception instance (for class exception) or exception value (for string exception).
 
Constructor Summary
PyException()
           
PyException(PyObject type)
           
PyException(PyObject type, PyObject value)
           
PyException(PyObject type, PyObject value, PyTraceback traceback)
           
PyException(PyObject type, java.lang.String value)
           
 
Method Summary
 void instantiate()
           
 void printStackTrace()
           
 void printStackTrace(java.io.PrintStream s)
           
 void super__printStackTrace(java.io.PrintWriter w)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

type

public PyObject type
The python exception class (for class exception) or identifier (for string exception).


value

public PyObject value
The exception instance (for class exception) or exception value (for string exception).


traceback

public PyTraceback traceback
Constructor Detail

PyException

public PyException()

PyException

public PyException(PyObject type)

PyException

public PyException(PyObject type,
                   PyObject value)

PyException

public PyException(PyObject type,
                   java.lang.String value)

PyException

public PyException(PyObject type,
                   PyObject value,
                   PyTraceback traceback)
Method Detail

instantiate

public void instantiate()

printStackTrace

public void printStackTrace()

printStackTrace

public void printStackTrace(java.io.PrintStream s)

super__printStackTrace

public void super__printStackTrace(java.io.PrintWriter w)

toString

public java.lang.String toString()


Jython homepage