from __future__ import annotations
__all__ = [
"PendingError",
"QueueError",
"QueueEmptyError",
"QueueFullError",
"QueueClosedError",
"QueueBrokenError",
"QueueRestrictedError",
]
[docs]class PendingError(Exception):
"""
Exception used exclusively for pending values.
This exception is used within the context of handling soon values.
"""
[docs]class QueueError(Exception):
"""
Base exception for queue-related errors.
This exception serves as the base class for various queue-related exceptions.
"""
[docs]class QueueEmptyError(QueueError):
"""
Exception raised when attempting to retrieve an item from an empty queue.
This exception occurs when trying to get an item from a queue
that has no available items.
"""
[docs]class QueueFullError(QueueError):
"""
Exception raised when attempting to add an item to a full queue.
This exception occurs when trying to put an item into a queue
that has reached its capacity.
"""
[docs]class QueueClosedError(QueueError):
"""
Error that occurs when attempting to get from or put into a closed queue.
This error is different from QueueBrokenError.
:exc:`QueueBrokenError` is an unintended error.
:exc:`QueueClosedError` is an error deliberately raised.
"""
[docs]class QueueBrokenError(QueueError):
"""
Error that occurs when trying to get from or put into a closed queue.
This error is different from QueueClosedError.
:exc:`QueueClosedError` is an error deliberately raised.
:exc:`QueueBrokenError` is an unintended error.
"""
[docs]class QueueRestrictedError(QueueError):
"""queue is restricted but used"""