Source code for faust.exceptions
"""Faust exceptions."""
__all__ = [
'FaustError',
'FaustWarning',
'AlreadyConfiguredWarning',
'ImproperlyConfigured',
'DecodeError',
'KeyDecodeError',
'ValueDecodeError',
'ConsumerNotStarted',
'PartitionsMismatch',
]
[docs]class FaustError(Exception):
"""Base-class for all Faust exceptions."""
[docs]class FaustWarning(UserWarning):
"""Base-class for all Faust warnings."""
[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."""
class SameNode(FaustError):
"""Exception raised by router when data is located on same node."""
class ProducerSendError(FaustError):
"""Error while sending attached messages prior to commit"""
[docs]class ConsumerNotStarted(FaustError):
"""Error trying to perform operation on consumer not started."""
[docs]class PartitionsMismatch(FaustError):
"""Number of partitions between related topics differ."""