public class PyException extends RuntimeException implements Traverseproc
type
 field and value or class instance is stored in the value field.| Modifier and Type | Field and Description | 
|---|---|
| PyTraceback | tracebackThe exception traceback object. | 
| PyObject | typeThe python exception class (for class exception) or identifier (for string exception). | 
| PyObject | valueThe exception instance (for class exception) or exception value (for string exception). | 
| Constructor and Description | 
|---|
| PyException() | 
| PyException(PyObject type) | 
| PyException(PyObject type,
           PyObject value) | 
| PyException(PyObject type,
           PyObject value,
           PyTraceback traceback) | 
| PyException(PyObject type,
           String value) | 
| Modifier and Type | Method and Description | 
|---|---|
| static PyException | doRaise(PyObject type,
       PyObject value,
       PyObject traceback)Logic for the raise statement | 
| static String | exceptionClassName(PyObject obj)Get the name of the exception's class | 
| Throwable | fillInStackTrace() | 
| static boolean | isExceptionClass(PyObject obj)Determine whether obj is a Python exception class | 
| static boolean | isExceptionInstance(PyObject obj)Determine whether obj is an Python exception instance | 
| boolean | match(PyObject exc)Determine if this PyException is a match for exc. | 
| void | normalize()Instantiates the exception value if it is not already an
 instance. | 
| void | printStackTrace() | 
| void | printStackTrace(PrintStream s) | 
| boolean | refersDirectlyTo(PyObject ob)Optional operation. | 
| void | super__printStackTrace(PrintWriter w) | 
| String | toString() | 
| void | tracebackHere(PyFrame here)Register frame as having been visited in the traceback. | 
| void | tracebackHere(PyFrame here,
             boolean isFinally)Register frame as having been visited in the traceback. | 
| int | traverse(Visitproc visit,
        Object arg)Traverses all directly contained  PyObjects. | 
addSuppressed, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, setStackTracepublic PyObject type
public PyObject value
public PyTraceback traceback
public PyException()
public PyException(PyObject type)
public PyException(PyObject type, PyObject value, PyTraceback traceback)
public void printStackTrace()
printStackTrace in class Throwablepublic Throwable fillInStackTrace()
fillInStackTrace in class Throwablepublic void printStackTrace(PrintStream s)
printStackTrace in class Throwablepublic void super__printStackTrace(PrintWriter w)
public void normalize()
public void tracebackHere(PyFrame here)
here - the current PyFramepublic void tracebackHere(PyFrame here, boolean isFinally)
here - the current PyFrameisFinally - whether caller is a Python finally blockpublic static PyException doRaise(PyObject type, PyObject value, PyObject traceback)
type - the first arg to raise, a type or an instancevalue - the second arg, the instance of the class or arguments to its
 constructortraceback - a traceback objectpublic boolean match(PyObject exc)
exc - a PyObject exception typepublic static boolean isExceptionClass(PyObject obj)
obj - a PyObjectpublic static boolean isExceptionInstance(PyObject obj)
obj - a PyObjectpublic static String exceptionClassName(PyObject obj)
obj - a PyObject exceptionpublic int traverse(Visitproc visit, Object arg)
TraverseprocPyObjects.
 Like in CPython, arg must be passed
 unmodified to visit as its second parameter.
 If Visitproc.visit(PyObject, Object) returns
 nonzero, this return value
 must be returned immediately by traverse.
 
 Visitproc.visit(PyObject, Object) must not be
 called with a null PyObject-argument.traverse in interface Traverseprocpublic boolean refersDirectlyTo(PyObject ob)
TraverseprocTraverseproc.traverse(Visitproc, Object) with
 a visitproc that just watches out for ob.
 Must return false if ob is null.refersDirectlyTo in interface Traverseproc