Source code for redpipe.exceptions
# -*- coding: utf-8 -*-
"""
This module contains the set of all of redpipe exceptions.
"""
__all__ = [
'Error',
'ResultNotReady',
'InvalidOperation',
'InvalidValue',
'AlreadyConnected',
'InvalidPipeline'
]
[docs]class Error(Exception):
"""
Base class for all redpipe errors
"""
[docs]class ResultNotReady(Error):
"""
Raised when you access a data from a Future before it is assigned.
"""
[docs]class InvalidOperation(Error):
"""
Raised when trying to perform an operation disallowed by the redpipe api.
"""
[docs]class InvalidValue(Error):
"""
Raised when data assigned to a field is the wrong type
"""
[docs]class AlreadyConnected(Error):
"""
raised when you try to connect and change the ORM connection
without explicitly disconnecting first.
"""
[docs]class InvalidPipeline(Error):
"""
raised when you try to use a pipeline that isn't configured correctly.
"""