• Home
  • Raw
  • Download

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.
326 Issue a :exc:`DeprecationWarning` with the given *message* and *stacklevel*
343 :const:`SIGINT` is to raise the :exc:`KeyboardInterrupt` exception. If an
356 next time :c:func:`PyErr_CheckSignals` is called, :exc:`KeyboardInterrupt` will
380 This creates a class object derived from :exc:`Exception` (accessible in C as
433 .. c:function:: PyObject* PyUnicodeDecodeError_GetEncoding(PyObject *exc)
434 PyObject* PyUnicodeEncodeError_GetEncoding(PyObject *exc)
438 .. c:function:: PyObject* PyUnicodeDecodeError_GetObject(PyObject *exc)
439 PyObject* PyUnicodeEncodeError_GetObject(PyObject *exc)
440 PyObject* PyUnicodeTranslateError_GetObject(PyObject *exc)
444 .. c:function:: int PyUnicodeDecodeError_GetStart(PyObject *exc, Py_ssize_t *start)
445 int PyUnicodeEncodeError_GetStart(PyObject *exc, Py_ssize_t *start)
446 int PyUnicodeTranslateError_GetStart(PyObject *exc, Py_ssize_t *start)
452 .. c:function:: int PyUnicodeDecodeError_SetStart(PyObject *exc, Py_ssize_t start)
453 int PyUnicodeEncodeError_SetStart(PyObject *exc, Py_ssize_t start)
454 int PyUnicodeTranslateError_SetStart(PyObject *exc, Py_ssize_t start)
459 .. c:function:: int PyUnicodeDecodeError_GetEnd(PyObject *exc, Py_ssize_t *end)
460 int PyUnicodeEncodeError_GetEnd(PyObject *exc, Py_ssize_t *end)
461 int PyUnicodeTranslateError_GetEnd(PyObject *exc, Py_ssize_t *end)
467 .. c:function:: int PyUnicodeDecodeError_SetEnd(PyObject *exc, Py_ssize_t end)
468 int PyUnicodeEncodeError_SetEnd(PyObject *exc, Py_ssize_t end)
469 int PyUnicodeTranslateError_SetEnd(PyObject *exc, Py_ssize_t end)
474 .. c:function:: PyObject* PyUnicodeDecodeError_GetReason(PyObject *exc)
475 PyObject* PyUnicodeEncodeError_GetReason(PyObject *exc)
476 PyObject* PyUnicodeTranslateError_GetReason(PyObject *exc)
480 .. c:function:: int PyUnicodeDecodeError_SetReason(PyObject *exc, const char *reason)
481 int PyUnicodeEncodeError_SetReason(PyObject *exc, const char *reason)
482 int PyUnicodeTranslateError_SetReason(PyObject *exc, const char *reason)
502 sets a :exc:`MemoryError` and returns a nonzero value.
505 case, a :exc:`RuntimeError` is set and a nonzero value is returned.
509 concatenated to the :exc:`RuntimeError` message caused by the recursion depth
531 | :c:data:`PyExc_BaseException` | :exc:`BaseException` | (1), (4) |
533 | :c:data:`PyExc_Exception` | :exc:`Exception` | \(1) |
535 | :c:data:`PyExc_StandardError` | :exc:`StandardError` | \(1) |
537 | :c:data:`PyExc_ArithmeticError` | :exc:`ArithmeticError` | \(1) |
539 | :c:data:`PyExc_LookupError` | :exc:`LookupError` | \(1) |
541 | :c:data:`PyExc_AssertionError` | :exc:`AssertionError` | |
543 | :c:data:`PyExc_AttributeError` | :exc:`AttributeError` | |
545 | :c:data:`PyExc_EOFError` | :exc:`EOFError` | |
547 | :c:data:`PyExc_EnvironmentError` | :exc:`EnvironmentError` | \(1) |
549 | :c:data:`PyExc_FloatingPointError` | :exc:`FloatingPointError` | |
551 | :c:data:`PyExc_IOError` | :exc:`IOError` | |
553 | :c:data:`PyExc_ImportError` | :exc:`ImportError` | |
555 | :c:data:`PyExc_IndexError` | :exc:`IndexError` | |
557 | :c:data:`PyExc_KeyError` | :exc:`KeyError` | |
559 | :c:data:`PyExc_KeyboardInterrupt` | :exc:`KeyboardInterrupt` | |
561 | :c:data:`PyExc_MemoryError` | :exc:`MemoryError` | |
563 | :c:data:`PyExc_NameError` | :exc:`NameError` | |
565 | :c:data:`PyExc_NotImplementedError` | :exc:`NotImplementedError` | |
567 | :c:data:`PyExc_OSError` | :exc:`OSError` | |
569 | :c:data:`PyExc_OverflowError` | :exc:`OverflowError` | |
571 | :c:data:`PyExc_ReferenceError` | :exc:`ReferenceError` | \(2) |
573 | :c:data:`PyExc_RuntimeError` | :exc:`RuntimeError` | |
575 | :c:data:`PyExc_SyntaxError` | :exc:`SyntaxError` | |
577 | :c:data:`PyExc_SystemError` | :exc:`SystemError` | |
579 | :c:data:`PyExc_SystemExit` | :exc:`SystemExit` | |
581 | :c:data:`PyExc_TypeError` | :exc:`TypeError` | |
583 | :c:data:`PyExc_ValueError` | :exc:`ValueError` | |
585 | :c:data:`PyExc_WindowsError` | :exc:`WindowsError` | \(3) |
587 | :c:data:`PyExc_ZeroDivisionError` | :exc:`ZeroDivisionError` | |
627 This is the same as :exc:`weakref.ReferenceError`.
641 All exceptions to be raised or caught must be derived from :exc:`BaseException`.
642 Trying to raise a string exception now raises :exc:`TypeError`.