Package org.python.core
Class PyException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.python.core.PyException
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
PySyntaxError
public class PyException extends java.lang.RuntimeExceptionA wrapper for all python exception. Note that the wellknown python exception are not subclasses of PyException. Instead the python exception class is stored in thetypefield and value or class instance is stored in thevaluefield.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PyException()PyException(PyObject type)PyException(PyObject type, java.lang.String value)PyException(PyObject type, PyObject value)PyException(PyObject type, PyObject value, PyTraceback traceback)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidinstantiate()voidprintStackTrace()voidprintStackTrace(java.io.PrintStream s)voidsuper__printStackTrace(java.io.PrintWriter w)java.lang.StringtoString()
-
-
-
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, java.lang.String value)
-
PyException
public PyException(PyObject type, PyObject value, PyTraceback traceback)
-
-
Method Detail
-
instantiate
public void instantiate()
-
printStackTrace
public void printStackTrace()
- Overrides:
printStackTracein classjava.lang.Throwable
-
printStackTrace
public void printStackTrace(java.io.PrintStream s)
- Overrides:
printStackTracein classjava.lang.Throwable
-
super__printStackTrace
public void super__printStackTrace(java.io.PrintWriter w)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Throwable
-
-