"""
Exception types that are raised if a Blue protocol-specific error occurs.
"""

__all__ = ["BlueProtocolException"]


class BlueProtocolException(Exception):
    """
    Raised when the Blue server response violates the expected binary protocol.

    This exception signals low-level framing errors such as a missing ``R``-byte
    in the response body or a mismatched SHA-1 digest.

    Args:
        message (str): A description of the protocol violation.
    """

    def __init__(self, message: str):
        self.message = message
        super().__init__(message)

    def __str__(self):
        return f"BlueProtocolException: {self.message}"
