Top Description Fields Constructors Methods
org.python.core

public Class PyBaseException

extends PyObject
implements Traverseproc
Class Inheritance
All Implemented Interfaces
org.python.core.Traverseproc
Known Direct Subclasses
org.python.core.PyBaseExceptionDerived
Annotations
@ExposedType
name:exceptions.BaseException
doc:Common base class for all exceptions
Imports
org.python.expose.ExposedDelete, .ExposedGet, .ExposedMethod, .ExposedNew, .ExposedSet, .ExposedType

The base class for all standard Python exceptions.

Field Summary

Modifier and TypeField and Description
public PyObject
__dict__

Exception's underlying dictionary, lazily created.

public PyObject
args

Exception's arguments.

private PyObject
message

Exception message.

public static final PyType
Inherited from org.python.core.PyObject:
attributesgcMonitorGlobalobjtype

Constructor Summary

AccessConstructor and Description
public
public

Method Summary

Modifier and TypeMethod and Description
public PyObject
__findattr_ex__(String name)

Overrides org.python.core.PyObject.__findattr_ex__.

Attribute lookup hook.

public PyObject
__getitem__(PyObject
the key to lookup in this container.
index
)

Overrides org.python.core.PyObject.__getitem__.

Equivalent to the standard Python __getitem__ method.

public PyObject
public void
__init__(PyObject[] args, String[] keywords)

public PyObject
__reduce__()

Overrides org.python.core.PyObject.__reduce__.

Used for pickling.

public void
__setattr__(String
the name whose value will be set - must be an interned string .
name
,
PyObject
the value to set this name to
value
)

Overrides org.python.core.PyObject.__setattr__.

A variant of the __setattr__ method which accepts a String as the key.

public PyObject
public PyString
__str__()

Overrides org.python.core.PyObject.__str__.

Equivalent to the standard Python __str__ method.

public PyUnicode
pack-priv final PyObject
pack-priv final PyObject
pack-priv final PyObject
pack-priv final void
pack-priv final PyObject
pack-priv final void
pack-priv final PyObject
pack-priv final PyString
pack-priv final PyUnicode
pack-priv final String
public void
private void
public PyObject
fastGetDict()

Overrides org.python.core.PyObject.fastGetDict.

xxx implements where meaningful

public PyObject
getDict()

Overrides org.python.core.PyObject.getDict.

xxx implements where meaningful

public PyObject
public boolean
public void
public void
public void
public String
toString()

Overrides org.python.core.PyObject.toString.

Returns a string representation of the object.

public int
traverse(Visitproc visit, Object arg)

Implements org.python.core.Traverseproc.traverse.

Traverses all directly contained PyObjects.

Inherited from org.python.core.PyObject:
__abs____add____and____call____call____call____call____call____call____call____call____call____call____call____call____call____call____call____call____cmp____coerce____coerce_ex____complex____contains____delattr____delattr____delete____delitem____delitem____delslice____delslice____dir____div____divmod____ensure_finalizer____eq____findattr____findattr____finditem____finditem____finditem____float____floordiv____format____ge____get____getattr____getattr____getitem____getnewargs____getslice____gt____hash____hex____iadd____iand____idiv____idivmod____ifloordiv____ilshift____imod____imul____index____int____invert____ior____ipow____irshift____isub____iter____iternext____itruediv____ixor____le____len____long____lshift____lt____mod____mul____ne____neg____nonzero____not____oct____or____pos____pow____pow____radd____rand____rawdir____rdiv____rdivmod____reduce_ex____reduce_ex____repr____rfloordiv____rlshift____rmod____rmul____ror____rpow____rrshift____rshift____rsub____rtruediv____rxor____set____setattr____setitem____setitem____setitem____setslice____setslice____sub____tojava____truediv____trunc____xor___add_and_basic_add_basic_and_basic_div_basic_divmod_basic_floordiv_basic_iadd_basic_iand_basic_idiv_basic_idivmod_basic_ifloordiv_basic_ilshift_basic_imod_basic_imul_basic_ior_basic_ipow_basic_irshift_basic_isub_basic_itruediv_basic_ixor_basic_lshift_basic_mod_basic_mul_basic_or_basic_pow_basic_rshift_basic_sub_basic_truediv_basic_xor_callextra_cmp_coerce_div_divmod_doget_doget_doset_eq_floordiv_ge_gt_iadd_iand_idiv_idivmod_ifloordiv_ilshift_imod_imul_in_ior_ipow_irshift_is_isnot_isub_itruediv_ixor_jcall_jcallexc_jthrow_le_lshift_lt_mod_mul_ne_notin_or_pow_rshift_sub_truediv_unsupportedop_xoradaptToCoerceTupleasDoubleasIndexasIndexasIntasIntasIterableasLongasLongasNameasNameasStringasStringasStringOrNullasStringOrNullbit_lengthconjugatedelDictdelTypedispatch__init__equalsfastGetClassfinalizegetJavaProxygetTypehashCodeimpAttrimplementsDescrDeleteimplementsDescrGetimplementsDescrSetinvokeinvokeinvokeinvokeinvokeinvokeisCallableisDataDescrisIndexisIntegerisMappingTypeisNumberTypeisSequenceTypejdontdelmergeClassDictmergeDictAttrmergeListAttrnoAttributeErrorobject___contains__object___delattr__object___delattr__object___findattr__object___format__object___getattribute__object___hash__object___init__object___new__object___reduce__object___reduce_ex__object___setattr__object___setattr__object___subclasshook__object_toStringproxyInitreadonlyAttributeErrorrunsupportedopMessagesetTypeunsupportedopMessage

Field Detail

__dict__back to summary
public PyObject __dict__

Exception's underlying dictionary, lazily created.

argsback to summary
public PyObject args

Exception's arguments.

Annotations
@ExposedGet
doc:

messageback to summary
private PyObject message

Exception message.

TYPEback to summary
public static final PyType TYPE

Hides org.python.core.PyObject.TYPE.

Constructor Detail

PyBaseExceptionback to summary
public PyBaseException()
PyBaseExceptionback to summary
public PyBaseException(PyType subType)

Method Detail

__findattr_ex__back to summary
public PyObject __findattr_ex__(String name)

Overrides org.python.core.PyObject.__findattr_ex__.

Doc from org.python.core.PyObject.__findattr_ex__.

Attribute lookup hook. If the attribute is not found, null may be returned or a Py.AttributeError can be thrown, whatever is more correct, efficient and/or convenient for the implementing class. Client code should use __getattr__(String) or __findattr__(String). Both methods have a clear policy for failed lookups.

Returns:PyObject

The looked up value. May return null if the attribute is not found

Annotations
@Override

__getitem__back to summary
public PyObject __getitem__(PyObject index)

Overrides org.python.core.PyObject.__getitem__.

Doc from org.python.core.PyObject.__getitem__.

Equivalent to the standard Python __getitem__ method. This method should not be overridden. Override the __finditem__ method instead.

Parameters
index:PyObject

the key to lookup in this container.

Returns:PyObject

the value corresponding to that key.

Annotations
@Override

__getslice__back to summary
public PyObject __getslice__(PyObject start, PyObject stop)

Overrides org.python.core.PyObject.__getslice__.

Annotations
@Override
__init__back to summary
public void __init__(PyObject[] args, String[] keywords)
__reduce__back to summary
public PyObject __reduce__()

Overrides org.python.core.PyObject.__reduce__.

Doc from org.python.core.PyObject.__reduce__.

Used for pickling. Default implementation calls object___reduce__.

Returns:PyObject

a tuple of (class, tuple)

Annotations
@Override

__setattr__back to summary
public void __setattr__(String name, PyObject value)

Overrides org.python.core.PyObject.__setattr__.

Doc from org.python.core.PyObject.__setattr__.

A variant of the __setattr__ method which accepts a String as the key. This String must be interned.

Parameters
name:String

the name whose value will be set - must be an interned string .

value:PyObject

the value to set this name to

Annotations
@Override
__setstate__back to summary
public PyObject __setstate__(PyObject state)
__str__back to summary
public PyString __str__()

Overrides org.python.core.PyObject.__str__.

Doc from org.python.core.PyObject.__str__.

Equivalent to the standard Python __str__ method. The default implementation (in PyObject) calls __repr__(), making it unnecessary to override __str__ in sub-classes of PyObject where both forms are the same. A common choice is to provide the same implementation to __str__ and toString, for consistency in the printed form of objects between Python and Java.

Annotations
@Override
__unicode__back to summary
public PyUnicode __unicode__()

Overrides org.python.core.PyObject.__unicode__.

Annotations
@Override
BaseException___findattr__back to summary
pack-priv final PyObject BaseException___findattr__(String name)
BaseException___getitem__back to summary
pack-priv final PyObject BaseException___getitem__(PyObject index)
Annotations
@ExposedMethod
doc:x.__getitem__(y) <==> x[y]
BaseException___getslice__back to summary
pack-priv final PyObject BaseException___getslice__(PyObject start, PyObject stop)
Annotations
@ExposedMethod
doc:x.__getslice__(i, j) <==> x[i:j] Use of negative indices is not supported.
BaseException___init__back to summary
pack-priv final void BaseException___init__(PyObject[] args, String[] keywords)
Annotations
@ExposedNew
@ExposedMethod
doc:x.__init__(...) initializes x; see help(type(x)) for signature
BaseException___reduce__back to summary
pack-priv final PyObject BaseException___reduce__()
Annotations
@ExposedMethod
doc:
BaseException___setattr__back to summary
pack-priv final void BaseException___setattr__(String name, PyObject value)
Annotations
@ExposedMethod
doc:x.__setattr__(\'name\', value) <==> x.name = value
BaseException___setstate__back to summary
pack-priv final PyObject BaseException___setstate__(PyObject state)
Annotations
@ExposedMethod
doc:
BaseException___str__back to summary
pack-priv final PyString BaseException___str__()
Annotations
@ExposedMethod
doc:x.__str__() <==> str(x)
BaseException___unicode__back to summary
pack-priv final PyUnicode BaseException___unicode__()
Annotations
@ExposedMethod
doc:
BaseException_toStringback to summary
pack-priv final String BaseException_toString()
Annotations
@ExposedMethod
names:__repr__
doc:x.__repr__() <==> repr(x)
delMessageback to summary
public void delMessage()
Annotations
@ExposedDelete
name:message
ensureDictback to summary
private void ensureDict()
fastGetDictback to summary
public PyObject fastGetDict()

Overrides org.python.core.PyObject.fastGetDict.

Doc from org.python.core.PyObject.fastGetDict.

xxx implements where meaningful

Returns:PyObject

internal object per instance dict or null

Annotations
@Override

getDictback to summary
public PyObject getDict()

Overrides org.python.core.PyObject.getDict.

Doc from org.python.core.PyObject.getDict.

xxx implements where meaningful

Returns:PyObject

internal object __dict__ or null

Annotations
@Override
@ExposedGet
name:__dict__
doc:

getMessageback to summary
public PyObject getMessage()
Annotations
@ExposedGet
name:message
doc:
refersDirectlyToback to summary
public boolean refersDirectlyTo(PyObject ob)

Implements org.python.core.Traverseproc.refersDirectlyTo.

Doc from org.python.core.Traverseproc.refersDirectlyTo.

Optional operation. Should only be implemented if it is more efficient than calling traverse(Visitproc, Object) with a visitproc that just watches out for ob. Must return false if ob is null.

Annotations
@Override
setArgsback to summary
public void setArgs(PyObject val)
Annotations
@ExposedSet
name:args
setDictback to summary
public void setDict(PyObject val)

Overrides org.python.core.PyObject.setDict.

Annotations
@Override
@ExposedSet
name:__dict__
setMessageback to summary
public void setMessage(PyObject value)
Annotations
@ExposedSet
name:message
toStringback to summary
public String toString()

Overrides org.python.core.PyObject.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override

traverseback to summary
public int traverse(Visitproc visit, Object arg)

Implements org.python.core.Traverseproc.traverse.

Doc from org.python.core.Traverseproc.traverse.

Traverses all directly contained PyObjects. 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.

Annotations
@Override