class StreamException(Exception):
    message = "Stream exception"

    def __init__(self, response=None, message=None):
        self.response = response
        self.message = message if message else self.message

    def __str__(self):
        return self.message


class StreamNotFoundException(StreamException):
    message = "Stream not found"


class StreamDeniedException(StreamException):
    message = "Stream does not have sufficient permissions"


class StreamTimeOutException(StreamException):
    message = "Stream timed out"


class StreamForbiddenException(StreamException):
    message = "Stream forbidden"


class StreamParseException(StreamException):
    message = "Stream could not be parsed"


class StreamConnectionException(StreamException):
    message = "A connection to the stream could not be made"


class StreamTooManyException(StreamException):
    message = "Too many requests"
