<reponame>d9pouces/django-floor
import logging
from socket import error as socket_error

from django.http import BadHeaderError

__author__ = "<NAME>"
logger = logging.getLogger("django.request")


# noinspection PyClassHasNoInit
class WebSocketError(socket_error):
    """
    Raised when an active websocket encounters a problem.
    """


class NoWindowKeyException(ValueError):
    """raise when the middleware DjangoFloorMiddleware is not used."""


# noinspection PyClassHasNoInit
class FrameTooLargeException(WebSocketError):
    """
    Raised if a received frame is too large.
    """


class HandshakeError(BadHeaderError):
    """
    Raised if an error occurs during protocol handshake.
    """


class UpgradeRequiredError(HandshakeError):
    """
    Raised if protocol must be upgraded.
    """

import logging
from socket import error as socket_error

from django.http import BadHeaderError

__author__ = "<NAME>"
logger = logging.getLogger("django.request")


# noinspection PyClassHasNoInit
class WebSocketError(socket_error):
    """
    Raised when an active websocket encounters a problem.
    """


class NoWindowKeyException(ValueError):
    """raise when the middleware DjangoFloorMiddleware is not used."""


# noinspection PyClassHasNoInit
class FrameTooLargeException(WebSocketError):
    """
    Raised if a received frame is too large.
    """


class HandshakeError(BadHeaderError):
    """
    Raised if an error occurs during protocol handshake.
    """


class UpgradeRequiredError(HandshakeError):
    """
    Raised if protocol must be upgraded.
    """
# noinspection PyClassHasNoInit Raised when an active websocket encounters a problem. raise when the middleware DjangoFloorMiddleware is not used. # noinspection PyClassHasNoInit Raised if a received frame is too large. Raised if an error occurs during protocol handshake. Raised if protocol must be upgraded.