Lines Matching refs:exc
76 .. c:function:: int PyErr_ExceptionMatches(PyObject *exc)
78 Equivalent to ``PyErr_GivenExceptionMatches(PyErr_Occurred(), exc)``. This
83 .. c:function:: int PyErr_GivenExceptionMatches(PyObject *given, PyObject *exc)
85 Return true if the *given* exception matches the exception in *exc*. If
86 *exc* is a class object, this also returns true when *given* is an instance
87 of a subclass. If *exc* is a tuple, all exceptions in the tuple (and
91 .. c:function:: void PyErr_NormalizeException(PyObject**exc, PyObject**val, PyObject**tb)
94 can be "unnormalized", meaning that ``*exc`` is a class object but ``*val`` is
199 a third parameter. In the case of exceptions such as :exc:`IOError` and
200 :exc:`OSError`, this is used to define the :attr:`filename` attribute of the
212 This is a convenience function to raise :exc:`WindowsError`. If called with
234 :exc:`WindowsError` as a third parameter. Availability: Windows.
321 Issue a :exc:`DeprecationWarning` with the given *message* and *stacklevel*
338 :const:`SIGINT` is to raise the :exc:`KeyboardInterrupt` exception. If an
351 next time :c:func:`PyErr_CheckSignals` is called, :exc:`KeyboardInterrupt` will
375 This creates a class object derived from :exc:`Exception` (accessible in C as
428 .. c:function:: PyObject* PyUnicodeDecodeError_GetEncoding(PyObject *exc)
429 PyObject* PyUnicodeEncodeError_GetEncoding(PyObject *exc)
433 .. c:function:: PyObject* PyUnicodeDecodeError_GetObject(PyObject *exc)
434 PyObject* PyUnicodeEncodeError_GetObject(PyObject *exc)
435 PyObject* PyUnicodeTranslateError_GetObject(PyObject *exc)
439 .. c:function:: int PyUnicodeDecodeError_GetStart(PyObject *exc, Py_ssize_t *start)
440 int PyUnicodeEncodeError_GetStart(PyObject *exc, Py_ssize_t *start)
441 int PyUnicodeTranslateError_GetStart(PyObject *exc, Py_ssize_t *start)
447 .. c:function:: int PyUnicodeDecodeError_SetStart(PyObject *exc, Py_ssize_t start)
448 int PyUnicodeEncodeError_SetStart(PyObject *exc, Py_ssize_t start)
449 int PyUnicodeTranslateError_SetStart(PyObject *exc, Py_ssize_t start)
454 .. c:function:: int PyUnicodeDecodeError_GetEnd(PyObject *exc, Py_ssize_t *end)
455 int PyUnicodeEncodeError_GetEnd(PyObject *exc, Py_ssize_t *end)
456 int PyUnicodeTranslateError_GetEnd(PyObject *exc, Py_ssize_t *end)
462 .. c:function:: int PyUnicodeDecodeError_SetEnd(PyObject *exc, Py_ssize_t end)
463 int PyUnicodeEncodeError_SetEnd(PyObject *exc, Py_ssize_t end)
464 int PyUnicodeTranslateError_SetEnd(PyObject *exc, Py_ssize_t end)
469 .. c:function:: PyObject* PyUnicodeDecodeError_GetReason(PyObject *exc)
470 PyObject* PyUnicodeEncodeError_GetReason(PyObject *exc)
471 PyObject* PyUnicodeTranslateError_GetReason(PyObject *exc)
475 .. c:function:: int PyUnicodeDecodeError_SetReason(PyObject *exc, const char *reason)
476 int PyUnicodeEncodeError_SetReason(PyObject *exc, const char *reason)
477 int PyUnicodeTranslateError_SetReason(PyObject *exc, const char *reason)
497 sets a :exc:`MemoryError` and returns a nonzero value.
500 case, a :exc:`RuntimeError` is set and a nonzero value is returned.
504 concatenated to the :exc:`RuntimeError` message caused by the recursion depth
568 | :c:data:`PyExc_BaseException` | :exc:`BaseException` | (1), (4) |
570 | :c:data:`PyExc_Exception` | :exc:`Exception` | \(1) |
572 | :c:data:`PyExc_StandardError` | :exc:`StandardError` | \(1) |
574 | :c:data:`PyExc_ArithmeticError` | :exc:`ArithmeticError` | \(1) |
576 | :c:data:`PyExc_AssertionError` | :exc:`AssertionError` | |
578 | :c:data:`PyExc_AttributeError` | :exc:`AttributeError` | |
580 | :c:data:`PyExc_BufferError` | :exc:`BufferError` | |
582 | :c:data:`PyExc_EnvironmentError` | :exc:`EnvironmentError` | \(1) |
584 | :c:data:`PyExc_EOFError` | :exc:`EOFError` | |
586 | :c:data:`PyExc_FloatingPointError` | :exc:`FloatingPointError` | |
588 | :c:data:`PyExc_GeneratorExit` | :exc:`GeneratorExit` | |
590 | :c:data:`PyExc_ImportError` | :exc:`ImportError` | |
592 | :c:data:`PyExc_IndentationError` | :exc:`IndentationError` | |
594 | :c:data:`PyExc_IndexError` | :exc:`IndexError` | |
596 | :c:data:`PyExc_IOError` | :exc:`IOError` | |
598 | :c:data:`PyExc_KeyError` | :exc:`KeyError` | |
600 | :c:data:`PyExc_KeyboardInterrupt` | :exc:`KeyboardInterrupt` | |
602 | :c:data:`PyExc_LookupError` | :exc:`LookupError` | \(1) |
604 | :c:data:`PyExc_MemoryError` | :exc:`MemoryError` | |
606 | :c:data:`PyExc_NameError` | :exc:`NameError` | |
608 | :c:data:`PyExc_NotImplementedError` | :exc:`NotImplementedError` | |
610 | :c:data:`PyExc_OSError` | :exc:`OSError` | |
612 | :c:data:`PyExc_OverflowError` | :exc:`OverflowError` | |
614 | :c:data:`PyExc_ReferenceError` | :exc:`ReferenceError` | \(2) |
616 | :c:data:`PyExc_RuntimeError` | :exc:`RuntimeError` | |
618 | :c:data:`PyExc_StopIteration` | :exc:`StopIteration` | |
620 | :c:data:`PyExc_SyntaxError` | :exc:`SyntaxError` | |
622 | :c:data:`PyExc_SystemError` | :exc:`SystemError` | |
624 | :c:data:`PyExc_SystemExit` | :exc:`SystemExit` | |
626 | :c:data:`PyExc_TabError` | :exc:`TabError` | |
628 | :c:data:`PyExc_TypeError` | :exc:`TypeError` | |
630 | :c:data:`PyExc_UnboundLocalError` | :exc:`UnboundLocalError` | |
632 | :c:data:`PyExc_UnicodeDecodeError` | :exc:`UnicodeDecodeError` | |
634 | :c:data:`PyExc_UnicodeEncodeError` | :exc:`UnicodeEncodeError` | |
636 | :c:data:`PyExc_UnicodeError` | :exc:`UnicodeError` | |
638 | :c:data:`PyExc_UnicodeTranslateError` | :exc:`UnicodeTranslateError` | |
640 | :c:data:`PyExc_VMSError` | :exc:`VMSError` | \(5) |
642 | :c:data:`PyExc_ValueError` | :exc:`ValueError` | |
644 | :c:data:`PyExc_WindowsError` | :exc:`WindowsError` | \(3) |
646 | :c:data:`PyExc_ZeroDivisionError` | :exc:`ZeroDivisionError` | |
655 This is the same as :exc:`weakref.ReferenceError`.
693 | :c:data:`PyExc_Warning` | :exc:`Warning` | \(1) |
695 | :c:data:`PyExc_BytesWarning` | :exc:`BytesWarning` | |
697 | :c:data:`PyExc_DeprecationWarning` | :exc:`DeprecationWarning` | |
699 | :c:data:`PyExc_FutureWarning` | :exc:`FutureWarning` | |
701 | :c:data:`PyExc_ImportWarning` | :exc:`ImportWarning` | |
703 | :c:data:`PyExc_PendingDeprecationWarning`| :exc:`PendingDeprecationWarning`| |
705 | :c:data:`PyExc_RuntimeWarning` | :exc:`RuntimeWarning` | |
707 | :c:data:`PyExc_SyntaxWarning` | :exc:`SyntaxWarning` | |
709 | :c:data:`PyExc_UnicodeWarning` | :exc:`UnicodeWarning` | |
711 | :c:data:`PyExc_UserWarning` | :exc:`UserWarning` | |
723 All exceptions to be raised or caught must be derived from :exc:`BaseException`.
724 Trying to raise a string exception now raises :exc:`TypeError`.