Class 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 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).
    • Constructor Detail

      • PyException

        public PyException()
      • PyException

        public PyException​(PyObject type)
      • PyException

        public PyException​(PyObject type,
                           java.lang.String value)
    • Method Detail

      • instantiate

        public void instantiate()
      • printStackTrace

        public void printStackTrace()
        Overrides:
        printStackTrace in class java.lang.Throwable
      • printStackTrace

        public void printStackTrace​(java.io.PrintStream s)
        Overrides:
        printStackTrace in class java.lang.Throwable
      • super__printStackTrace

        public void super__printStackTrace​(java.io.PrintWriter w)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Throwable