Source code for faust.exceptions

"""Faust exceptions."""

__all__ = [
    'FaustError',
    'FaustWarning',
    'NotReady',
    'AlreadyConfiguredWarning',
    'ImproperlyConfigured',
    'DecodeError',
    'KeyDecodeError',
    'ValueDecodeError',
    'SameNode',
    'ProducerSendError',
    'ConsumerNotStarted',
    'PartitionsMismatch',
]


[docs]class FaustError(Exception): """Base-class for all Faust exceptions."""
[docs]class FaustWarning(UserWarning): """Base-class for all Faust warnings."""
[docs]class NotReady(FaustError): """Service not started."""
[docs]class AlreadyConfiguredWarning(FaustWarning): """Trying to configure app after configuration accessed."""
[docs]class ImproperlyConfigured(FaustError): """The library is not configured/installed correctly."""
[docs]class DecodeError(FaustError): """Error while decoding/deserializing message key/value."""
[docs]class KeyDecodeError(DecodeError): """Error while decoding/deserializing message key."""
[docs]class ValueDecodeError(DecodeError): """Error while decoding/deserializing message value."""
[docs]class SameNode(FaustError): """Exception raised by router when data is located on same node."""
[docs]class ProducerSendError(FaustError): """Error while sending attached messages prior to commit."""
[docs]class ConsumerNotStarted(NotReady): """Error trying to perform operation on consumer not started."""
[docs]class PartitionsMismatch(FaustError): """Number of partitions between related topics differ."""
class ConsistencyError(FaustError): """Persisted table offset is out of sync with changelog topic highwater."""