
    tf                         d Z ddlZddlmZmZmZ  G d de          Z G d de          Z G d d	e          Z	ej
        d
ee         deg ef         ded         fd            ZdS )z
HAProxy specific exceptions.
    N)Callable	GeneratorTypec                       e Zd ZdZdS )InvalidProxyHeaderz8
    The provided PROXY protocol header is invalid.
    N__name__
__module____qualname____doc__     d/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/twisted/protocols/haproxy/_exceptions.pyr   r                 r   r   c                       e Zd ZdZdS )InvalidNetworkProtocolzC
    The network protocol was not one of TCP4 TCP6 or UNKNOWN.
    Nr   r   r   r   r   r      r   r   r   c                       e Zd ZdZdS )MissingAddressDataz4
    The address data is missing or incomplete.
    Nr   r   r   r   r   r      r   r   r   
sourceType
targetTypereturn)NNNc              #   r   K   	 dV  dS # | $ r'} |                                 |j                  d}~ww xY w)aA  
    Convert an error into a different error type.

    @param sourceType: The type of exception that should be caught and
        converted.
    @type sourceType: L{BaseException}

    @param targetType: The type of exception to which the original should be
        converted.
    @type targetType: L{BaseException}
    N)with_traceback__traceback__)r   r   es      r   convertErrorr      sS      ; ; ; ;jll))!/:::;s   
 6"16)r   
contextlibtypingr   r   r   	Exceptionr   r   r   contextmanagerBaseExceptionr   r   r   r   <module>r"      s  
      , , , , , , , , , ,           /       +    ;]#;19"m:K1L; ; ; ; ; ; ;r   