Liking cljdoc? Tell your friends :D
Clojure only.

libpython-clj.jna.concrete.err


def-err-symbolcljmacro

(def-err-symbol sym-name)

PyErr_BadArgumentclj

(PyErr_BadArgument)

This is a shorthand for PyErr_SetString(PyExc_TypeError, message), where message indicates that a built-in operation was invoked with an illegal argument. It is mostly for internal use.

This is a shorthand for PyErr_SetString(PyExc_TypeError, message), where message
indicates that a built-in operation was invoked with an illegal argument. It is mostly
for internal use.
raw docstring

PyErr_BadInternalCallclj

(PyErr_BadInternalCall)

This is a shorthand for PyErr_SetString(PyExc_SystemError, message), where message indicates that an internal operation (e.g. a Python/C API function) was invoked with an illegal argument. It is mostly for internal use.

This is a shorthand for PyErr_SetString(PyExc_SystemError, message), where message
indicates that an internal operation (e.g. a Python/C API function) was invoked with
an illegal argument. It is mostly for internal use.
raw docstring

PyErr_Clearclj

(PyErr_Clear)

Clear the error indicator. If the error indicator is not set, there is no effect.

Clear the error indicator. If the error indicator is not set, there is no effect.
raw docstring

PyErr_Fetchclj

(PyErr_Fetch ptype pvalue ptraceback)

Retrieve the error indicator into three variables whose addresses are passed. If the error indicator is not set, set all three variables to NULL. If it is set, it will be cleared and you own a reference to each object retrieved. The value and traceback object may be NULL even when the type object is not.

Note

This function is normally only used by code that needs to catch exceptions or by code that needs to save and restore the error indicator temporarily, e.g.:

{ PyObject *type, *value, *traceback; PyErr_Fetch(&type, &value, &traceback);

 /* ... code that might produce other errors ... */

 PyErr_Restore(type, value, traceback);

}

Retrieve the error indicator into three variables whose addresses are passed. If the
error indicator is not set, set all three variables to NULL. If it is set, it will be
cleared and you own a reference to each object retrieved. The value and traceback
object may be NULL even when the type object is not.

 Note

 This function is normally only used by code that needs to catch exceptions or by code
 that needs to save and restore the error indicator temporarily, e.g.:

  {
     PyObject *type, *value, *traceback;
     PyErr_Fetch(&type, &value, &traceback);

     /* ... code that might produce other errors ... */

     PyErr_Restore(type, value, traceback);
  }
raw docstring

PyErr_NoMemoryclj

(PyErr_NoMemory)

Return value: Always NULL.

This is a shorthand for PyErr_SetNone(PyExc_MemoryError); it returns NULL so an object allocation function can write return PyErr_NoMemory(); when it runs out of memory.

Return value: Always NULL.

This is a shorthand for PyErr_SetNone(PyExc_MemoryError); it returns NULL so an
object allocation function can write return PyErr_NoMemory(); when it runs out of
memory.
raw docstring

PyErr_Occurredclj

(PyErr_Occurred)

Check if the error indicator is set. If so, return the exception type.

Check if the error indicator is set.  If so, return the exception type.
raw docstring

PyErr_Printclj

(PyErr_Print)

Alias for PyErr_PrintEx(1).

Alias for PyErr_PrintEx(1).
raw docstring

PyErr_PrintExclj

(PyErr_PrintEx set-sys-last-vars)

Print a standard traceback to sys.stderr and clear the error indicator. Unless the error is a SystemExit. In that case the no traceback is printed and Python process will exit with the error code specified by the SystemExit instance.

Call this function only when the error indicator is set. Otherwise it will cause a fatal error!

If set_sys_last_vars is nonzero, the variables sys.last_type, sys.last_value and sys.last_traceback will be set to the type, value and traceback of the printed exception, respectively.

Print a standard traceback to sys.stderr and clear the error indicator. Unless the
error is a SystemExit. In that case the no traceback is printed and Python process
will exit with the error code specified by the SystemExit instance.

 Call this function only when the error indicator is set. Otherwise it will cause a
 fatal error!

 If set_sys_last_vars is nonzero, the variables sys.last_type, sys.last_value and
 sys.last_traceback will be set to the type, value and traceback of the printed
 exception, respectively.
raw docstring

PyErr_Restoreclj

(PyErr_Restore value traceback)

Set the error indicator from the three objects. If the error indicator is already set, it is cleared first. If the objects are NULL, the error indicator is cleared. Do not pass a NULL type and non-NULL value or traceback. The exception type should be a class. Do not pass an invalid exception type or value. (Violating these rules will cause subtle problems later.) This call takes away a reference to each object: you must own a reference to each object before the call and after the call you no longer own these references. (If you don’t understand this, don’t use this function. I warned you.)

Note

This function is normally only used by code that needs to save and restore the error indicator temporarily. Use PyErr_Fetch() to save the current error indicator.

Set the error indicator from the three objects. If the error indicator is already
set, it is cleared first. If the objects are NULL, the error indicator is cleared. Do
not pass a NULL type and non-NULL value or traceback. The exception type should be a
class. Do not pass an invalid exception type or value. (Violating these rules will
cause subtle problems later.) This call takes away a reference to each object: you
must own a reference to each object before the call and after the call you no longer
own these references. (If you don’t understand this, don’t use this function. I warned
you.)

Note

This function is normally only used by code that needs to save and restore the error
indicator temporarily. Use PyErr_Fetch() to save the current error indicator.
raw docstring

PyErr_SetFromErrnoclj

(PyErr_SetFromErrno type)

Return value: Always NULL.

This is a convenience function to raise an exception when a C library function has returned an error and set the C variable errno. It constructs a tuple object whose first item is the integer errno value and whose second item is the corresponding error message (gotten from strerror()), and then calls PyErr_SetObject(type, object). On Unix, when the errno value is EINTR, indicating an interrupted system call, this calls PyErr_CheckSignals(), and if that set the error indicator, leaves it set to that. The function always returns NULL, so a wrapper function around a system call can write return PyErr_SetFromErrno(type); when the system call returns an error.

Return value: Always NULL.

This is a convenience function to raise an exception when a C library function has
returned an error and set the C variable errno. It constructs a tuple object whose
first item is the integer errno value and whose second item is the corresponding
error message (gotten from strerror()), and then calls PyErr_SetObject(type,
object). On Unix, when the errno value is EINTR, indicating an interrupted system
call, this calls PyErr_CheckSignals(), and if that set the error indicator, leaves it
set to that. The function always returns NULL, so a wrapper function around a system
call can write return PyErr_SetFromErrno(type); when the system call returns an
error.
raw docstring

PyErr_SetNoneclj

(PyErr_SetNone type)

This is a shorthand for PyErr_SetObject(type, Py_None).

This is a shorthand for PyErr_SetObject(type, Py_None).
raw docstring

PyErr_SetObjectclj

(PyErr_SetObject type value)

This function is similar to PyErr_SetString() but lets you specify an arbitrary Python object for the “value” of the exception.

This function is similar to PyErr_SetString() but lets you specify an arbitrary
Python object for the “value” of the exception.
raw docstring

PyErr_SetStringclj

(PyErr_SetString type message)

This is the most common way to set the error indicator. The first argument specifies the exception type; it is normally one of the standard exceptions, e.g. PyExc_RuntimeError. You need not increment its reference count. The second argument is an error message; it is decoded from 'utf-8’.

This is the most common way to set the error indicator. The first argument specifies
the exception type; it is normally one of the standard exceptions,
e.g. PyExc_RuntimeError. You need not increment its reference count. The second
argument is an error message; it is decoded from 'utf-8’.
raw docstring

PyErr_WarnExclj

(PyErr_WarnEx category message stack_level)

Issue a warning message. The category argument is a warning category (see below) or NULL; the message argument is a UTF-8 encoded string. stack_level is a positive number giving a number of stack frames; the warning will be issued from the currently executing line of code in that stack frame. A stack_level of 1 is the function calling PyErr_WarnEx(), 2 is the function above that, and so forth.

Warning categories must be subclasses of PyExc_Warning; PyExc_Warning is a subclass of PyExc_Exception; the default warning category is PyExc_RuntimeWarning. The standard Python warning categories are available as global variables whose names are enumerated at Standard Warning Categories.

For information about warning control, see the documentation for the warnings module and the -W option in the command line documentation. There is no C API for warning control.

Issue a warning message. The category argument is a warning category (see below) or
NULL; the message argument is a UTF-8 encoded string. stack_level is a positive number
giving a number of stack frames; the warning will be issued from the currently
executing line of code in that stack frame. A stack_level of 1 is the function calling
PyErr_WarnEx(), 2 is the function above that, and so forth.

 Warning categories must be subclasses of PyExc_Warning; PyExc_Warning is a subclass
 of PyExc_Exception; the default warning category is PyExc_RuntimeWarning. The
 standard Python warning categories are available as global variables whose names are
 enumerated at Standard Warning Categories.

 For information about warning control, see the documentation for the warnings module
 and the -W option in the command line documentation. There is no C API for warning
 control.
raw docstring

PyErr_WarnExplicitclj

(PyErr_WarnExplicit category message filename lineno module registry)

Similar to PyErr_WarnExplicitObject() except that message and module are UTF-8 encoded strings, and filename is decoded from the filesystem encoding (os.fsdecode()).

Similar to PyErr_WarnExplicitObject() except that message and module are UTF-8
encoded strings, and filename is decoded from the filesystem encoding (os.fsdecode()).
raw docstring

PyErr_WriteUnraisableclj

(PyErr_WriteUnraisable obj)

This utility function prints a warning message to sys.stderr when an exception has been set but it is impossible for the interpreter to actually raise the exception. It is used, for example, when an exception occurs in an del() method.

The function is called with a single argument obj that identifies the context in which the unraisable exception occurred. If possible, the repr of obj will be printed in the warning message.

An exception must be set when calling this function.

This utility function prints a warning message to sys.stderr when an exception has
been set but it is impossible for the interpreter to actually raise the exception. It
is used, for example, when an exception occurs in an __del__() method.

The function is called with a single argument obj that identifies the context in
which the unraisable exception occurred. If possible, the repr of obj will be printed
in the warning message.

An exception must be set when calling this function.
raw docstring

PyExc_ArithmeticErrorclj

(PyExc_ArithmeticError)

PyExc_AssertionErrorclj

(PyExc_AssertionError)

PyExc_AttributeErrorclj

(PyExc_AttributeError)

PyExc_BaseExceptionclj

(PyExc_BaseException)

PyExc_BlockingIOErrorclj

(PyExc_BlockingIOError)

PyExc_BrokenPipeErrorclj

(PyExc_BrokenPipeError)

PyExc_BufferErrorclj

(PyExc_BufferError)

PyExc_BytesWarningclj

(PyExc_BytesWarning)

PyExc_ChildProcessErrorclj

(PyExc_ChildProcessError)

PyExc_ConnectionAbortedErrorclj

(PyExc_ConnectionAbortedError)

PyExc_ConnectionErrorclj

(PyExc_ConnectionError)

PyExc_ConnectionRefusedErrorclj

(PyExc_ConnectionRefusedError)

PyExc_ConnectionResetErrorclj

(PyExc_ConnectionResetError)

PyExc_DeprecationWarningclj

(PyExc_DeprecationWarning)

PyExc_EOFErrorclj

(PyExc_EOFError)

PyExc_Exceptionclj

(PyExc_Exception)

PyExc_FileExistsErrorclj

(PyExc_FileExistsError)

PyExc_FileNotFoundErrorclj

(PyExc_FileNotFoundError)

PyExc_FloatingPointErrorclj

(PyExc_FloatingPointError)

PyExc_FutureWarningclj

(PyExc_FutureWarning)

PyExc_GeneratorExitclj

(PyExc_GeneratorExit)

PyExc_ImportErrorclj

(PyExc_ImportError)

PyExc_ImportWarningclj

(PyExc_ImportWarning)

PyExc_IndentationErrorclj

(PyExc_IndentationError)

PyExc_IndexErrorclj

(PyExc_IndexError)

PyExc_InterruptedErrorclj

(PyExc_InterruptedError)

PyExc_IsADirectoryErrorclj

(PyExc_IsADirectoryError)

PyExc_KeyboardInterruptclj

(PyExc_KeyboardInterrupt)

PyExc_KeyErrorclj

(PyExc_KeyError)

PyExc_LookupErrorclj

(PyExc_LookupError)

PyExc_MemoryErrorclj

(PyExc_MemoryError)

PyExc_ModuleNotFoundErrorclj

(PyExc_ModuleNotFoundError)

PyExc_NameErrorclj

(PyExc_NameError)

PyExc_NotADirectoryErrorclj

(PyExc_NotADirectoryError)

PyExc_NotImplementedErrorclj

(PyExc_NotImplementedError)

PyExc_OSErrorclj

(PyExc_OSError)

PyExc_OverflowErrorclj

(PyExc_OverflowError)

PyExc_PendingDeprecationWarningclj

(PyExc_PendingDeprecationWarning)

PyExc_PermissionErrorclj

(PyExc_PermissionError)

PyExc_ProcessLookupErrorclj

(PyExc_ProcessLookupError)

PyExc_RecursionErrorclj

(PyExc_RecursionError)

PyExc_ReferenceErrorclj

(PyExc_ReferenceError)

PyExc_ResourceWarningclj

(PyExc_ResourceWarning)

PyExc_RuntimeErrorclj

(PyExc_RuntimeError)

PyExc_RuntimeWarningclj

(PyExc_RuntimeWarning)

PyExc_StopAsyncIterationclj

(PyExc_StopAsyncIteration)

PyExc_StopIterationclj

(PyExc_StopIteration)

PyExc_SyntaxErrorclj

(PyExc_SyntaxError)

PyExc_SyntaxWarningclj

(PyExc_SyntaxWarning)

PyExc_SystemErrorclj

(PyExc_SystemError)

PyExc_SystemExitclj

(PyExc_SystemExit)

PyExc_TabErrorclj

(PyExc_TabError)

PyExc_TimeoutErrorclj

(PyExc_TimeoutError)

PyExc_TypeErrorclj

(PyExc_TypeError)

PyExc_UnboundLocalErrorclj

(PyExc_UnboundLocalError)

PyExc_UnicodeDecodeErrorclj

(PyExc_UnicodeDecodeError)

PyExc_UnicodeEncodeErrorclj

(PyExc_UnicodeEncodeError)

PyExc_UnicodeErrorclj

(PyExc_UnicodeError)

PyExc_UnicodeTranslateErrorclj

(PyExc_UnicodeTranslateError)

PyExc_UnicodeWarningclj

(PyExc_UnicodeWarning)

PyExc_UserWarningclj

(PyExc_UserWarning)

PyExc_ValueErrorclj

(PyExc_ValueError)

PyExc_Warningclj

(PyExc_Warning)

PyExc_ZeroDivisionErrorclj

(PyExc_ZeroDivisionError)

PyException_GetCauseclj

(PyException_GetCause ex)

Return value: New reference.

Return the cause (either an exception instance, or None, set by raise ... from ...) associated with the exception as a new reference, as accessible from Python through cause.

Return value: New reference.

Return the cause (either an exception instance, or None, set by raise ... from ...)
associated with the exception as a new reference, as accessible from Python through
__cause__.
raw docstring

PyException_GetContextclj

(PyException_GetContext ex)

Return value: New reference.

Return the context (another exception instance during whose handling ex was raised) associated with the exception as a new reference, as accessible from Python through context. If there is no context associated, this returns NULL.

Return value: New reference.

Return the context (another exception instance during whose handling ex was raised)
associated with the exception as a new reference, as accessible from Python through
__context__. If there is no context associated, this returns NULL.
raw docstring

PyException_GetTracebackclj

(PyException_GetTraceback ex)

Return value: New reference.

Return the traceback associated with the exception as a new reference, as accessible from Python through traceback. If there is no traceback associated, this returns NULL.

Return value: New reference.

Return the traceback associated with the exception as a new reference, as accessible
from Python through __traceback__. If there is no traceback associated, this returns
NULL.
raw docstring

PyException_SetCauseclj

(PyException_SetCause ex cause)

Set the cause associated with the exception to cause. Use NULL to clear it. There is no type check to make sure that cause is either an exception instance or None. This steals a reference to cause.

suppress_context is implicitly set to True by this function.

Set the cause associated with the exception to cause. Use NULL to clear it. There is
no type check to make sure that cause is either an exception instance or None. This
steals a reference to cause.

 __suppress_context__ is implicitly set to True by this function.
raw docstring

PyException_SetContextclj

(PyException_SetContext ex ctx)

Set the context associated with the exception to ctx. Use NULL to clear it. There is no type check to make sure that ctx is an exception instance. This steals a reference to ctx.

Set the context associated with the exception to ctx. Use NULL to clear it. There is
no type check to make sure that ctx is an exception instance. This steals a reference
to ctx.
raw docstring

PyException_SetTracebackclj

(PyException_SetTraceback ex tb)

Set the traceback associated with the exception to tb. Use Py_None to clear it.

Set the traceback associated with the exception to tb. Use Py_None to clear it.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close