Top Description Fields Constructors Methods
org.python.core

pack-priv Class BaseException

extends RuntimeException
implements CraftedPyObject
Class Inheritance
All Implemented Interfaces
org.python.core.CraftedPyObject
Known Direct Subclasses
org.python.core.PyException
Imports
java.lang.invoke.MethodHandles

The Python BaseException exception.

Field Summary

Modifier and TypeField and Description
pack-priv final Object[]
private static final long
pack-priv static final PyType
TYPE

The type of Python object this class implements.

private final PyType

Constructor Summary

AccessConstructor and Description
protected
BaseException(PyType
object being constructed
type
,
String
a Java format string for the message
msg
,
Object...
to insert in the format string
args
)

Constructor for sub-class use specifying type.

public
BaseException(String
a Java format string for the message
msg
,
Object...
to insert in the format string
args
)

Constructor specifying a message.

Method Summary

Modifier and TypeMethod and Description
protected Object
public PyType
getType()

Implements org.python.core.CraftedPyObject.getType.

The Python type of this object.
public String
toString()

Overrides java.lang.Throwable.toString.

Returns a short description of this throwable.

Field Detail

argsback to summary
pack-priv final Object[] args
serialVersionUIDback to summary
private static final long serialVersionUID

Hides java.lang.RuntimeException.serialVersionUID.

TYPEback to summary
pack-priv static final PyType TYPE

The type of Python object this class implements.

typeback to summary
private final PyType type

Constructor Detail

BaseExceptionback to summary
protected BaseException(PyType type, String msg, Object... args)

Constructor for sub-class use specifying type. The message msg is a Java format string in which the constructor arguments args are used to fill the place holders. The formatted message is the exception message from the Java point of view.

From a Python perspective, the tuple (exception.args) has one element, the formatted message, or zero elements if the message is zero length.

Parameters
type:PyType

object being constructed

msg:String

a Java format string for the message

args:Object[]

to insert in the format string

BaseExceptionback to summary
public BaseException(String msg, Object... args)

Constructor specifying a message.

Parameters
msg:String

a Java format string for the message

args:Object[]

to insert in the format string

Method Detail

__repr__back to summary
protected Object __repr__()
getTypeback to summary
public PyType getType()

Implements org.python.core.CraftedPyObject.getType.

Doc from org.python.core.CraftedPyObject.getType.

The Python type of this object.

Returns:PyType

type of this object

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Throwable.toString.

Doc from java.lang.Throwable.toString.

Returns a short description of this throwable. The result is the concatenation of:

  • the name of the class of this object
  • ": " (a colon and a space)
  • the result of invoking this object's getLocalizedMessage method
If getLocalizedMessage returns null, then just the class name is returned.
Returns:String

a string representation of this throwable.

Annotations
@Override