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 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."""
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."""