U
    ÕCdG  ã                   @   sX   d Z G dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG d	d
„ d
eƒZdS )zg
hyperframe/exceptions
~~~~~~~~~~~~~~~~~~~~~

Defines the exceptions that can be thrown by hyperframe.
c                   @   s   e Zd ZdZdS )ÚHyperframeErrorzc
    The base class for all exceptions for the hyperframe module.

    .. versionadded:: 6.0.0
    N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r   r   ú9/tmp/pip-unpacked-wheel-dy1oe_bd/hyperframe/exceptions.pyr   
   s   r   c                   @   s0   e Zd ZdZeeddœdd„Zedœdd„ZdS )	ÚUnknownFrameErrorz—
    A frame of unknown type was received.

    .. versionchanged:: 6.0.0
        Changed base class from `ValueError` to :class:`HyperframeError`
    N)Ú
frame_typeÚlengthÚreturnc                 C   s   || _ || _d S )N©r
   r   )Úselfr
   r   r   r   r   Ú__init__   s    zUnknownFrameError.__init__)r   c                 C   s   d| j | jf S )NzDUnknownFrameError: Unknown frame type 0x%X received, length %d bytesr   )r   r   r   r   Ú__str__    s    
ÿÿzUnknownFrameError.__str__)r   r   r   r   Úintr   Ústrr   r   r   r   r   r	      s   r	   c                   @   s   e Zd ZdZdS )ÚInvalidPaddingErrorzœ
    A frame with invalid padding was received.

    .. versionchanged:: 6.0.0
        Changed base class from `ValueError` to :class:`HyperframeError`
    Nr   r   r   r   r   r   '   s   r   c                   @   s   e Zd ZdZdS )ÚInvalidFrameErrorzÖ
    Parsing a frame failed because the data was not laid out appropriately.

    .. versionadded:: 3.0.2

    .. versionchanged:: 6.0.0
        Changed base class from `ValueError` to :class:`HyperframeError`
    Nr   r   r   r   r   r   1   s   r   c                   @   s   e Zd ZdZdS )ÚInvalidDataErrorzo
    Content or data of a frame was is invalid or violates the specification.

    .. versionadded:: 6.0.0
    Nr   r   r   r   r   r   =   s   r   N)r   Ú	Exceptionr   r	   r   r   r   r   r   r   r   Ú<module>   s
   
