pyo3

Module exceptions

Source
Expand description

Exception and warning types defined by Python.

The structs in this module represent Python’s built-in exceptions and warnings, while the modules comprise structs representing errors defined in Python code.

The latter are created with the import_exception macro, which you can use yourself to import Python classes that are ultimately derived from BaseException.

Modules§

asyncio
Exceptions defined in Python’s asyncio module.
socket
Exceptions defined in Python’s socket module.

Structs§

PyArithmeticError
Represents Python’s ArithmeticError exception.
PyAssertionError
Represents Python’s AssertionError exception.
PyAttributeError
Represents Python’s AttributeError exception.
PyBaseException
Represents Python’s BaseException exception.
PyBlockingIOError
Represents Python’s BlockingIOError exception.
PyBrokenPipeError
Represents Python’s BrokenPipeError exception.
PyBufferError
Represents Python’s BufferError exception.
PyBytesWarning
Represents Python’s BytesWarning exception.
PyChildProcessError
Represents Python’s ChildProcessError exception.
PyConnectionAbortedError
Represents Python’s ConnectionAbortedError exception.
PyConnectionError
Represents Python’s ConnectionError exception.
PyConnectionRefusedError
Represents Python’s ConnectionRefusedError exception.
PyConnectionResetError
Represents Python’s ConnectionResetError exception.
PyDeprecationWarning
Represents Python’s DeprecationWarning exception.
PyEOFError
Represents Python’s EOFError exception.
PyEnvironmentError
Represents Python’s EnvironmentError exception.
PyException
Represents Python’s Exception exception.
PyFileExistsError
Represents Python’s FileExistsError exception.
PyFileNotFoundError
Represents Python’s FileNotFoundError exception.
PyFloatingPointError
Represents Python’s FloatingPointError exception.
PyFutureWarning
Represents Python’s FutureWarning exception.
PyGeneratorExit
Represents Python’s GeneratorExit exception.
PyIOError
Represents Python’s IOError exception.
PyImportError
Represents Python’s ImportError exception.
PyImportWarning
Represents Python’s ImportWarning exception.
PyIndexError
Represents Python’s IndexError exception.
PyInterruptedError
Represents Python’s InterruptedError exception.
PyIsADirectoryError
Represents Python’s IsADirectoryError exception.
PyKeyError
Represents Python’s KeyError exception.
PyKeyboardInterrupt
Represents Python’s KeyboardInterrupt exception.
PyLookupError
Represents Python’s LookupError exception.
PyMemoryError
Represents Python’s MemoryError exception.
PyModuleNotFoundError
Represents Python’s ModuleNotFoundError exception.
PyNameError
Represents Python’s NameError exception.
PyNotADirectoryError
Represents Python’s NotADirectoryError exception.
PyNotImplementedError
Represents Python’s NotImplementedError exception.
PyOSError
Represents Python’s OSError exception.
PyOverflowError
Represents Python’s OverflowError exception.
PyPendingDeprecationWarning
Represents Python’s PendingDeprecationWarning exception.
PyPermissionError
Represents Python’s PermissionError exception.
PyProcessLookupError
Represents Python’s ProcessLookupError exception.
PyRecursionError
Represents Python’s RecursionError exception.
PyReferenceError
Represents Python’s ReferenceError exception.
PyResourceWarning
Represents Python’s ResourceWarning exception.
PyRuntimeError
Represents Python’s RuntimeError exception.
PyRuntimeWarning
Represents Python’s RuntimeWarning exception.
PyStopAsyncIteration
Represents Python’s StopAsyncIteration exception.
PyStopIteration
Represents Python’s StopIteration exception.
PySyntaxError
Represents Python’s SyntaxError exception.
PySyntaxWarning
Represents Python’s SyntaxWarning exception.
PySystemError
Represents Python’s SystemError exception.
PySystemExit
Represents Python’s SystemExit exception.
PyTimeoutError
Represents Python’s TimeoutError exception.
PyTypeError
Represents Python’s TypeError exception.
PyUnboundLocalError
Represents Python’s UnboundLocalError exception.
PyUnicodeDecodeError
Represents Python’s UnicodeDecodeError exception.
PyUnicodeEncodeError
Represents Python’s UnicodeEncodeError exception.
PyUnicodeError
Represents Python’s UnicodeError exception.
PyUnicodeTranslateError
Represents Python’s UnicodeTranslateError exception.
PyUnicodeWarning
Represents Python’s UnicodeWarning exception.
PyUserWarning
Represents Python’s UserWarning exception.
PyValueError
Represents Python’s ValueError exception.
PyWarning
Represents Python’s Warning exception.
PyZeroDivisionError
Represents Python’s ZeroDivisionError exception.