U
    ‰d[	  ã                   @   s&  d Z ddlmZ ddlmZmZmZ dZd&d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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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 )'zExceptions.é    )Útimeout)ÚChannelErrorÚConnectionErrorÚResourceError)ÚreraiseÚ
KombuErrorÚOperationalErrorÚNotBoundErrorÚMessageStateErrorÚTimeoutErrorÚLimitExceededÚConnectionLimitExceededÚChannelLimitExceededr   r   ÚVersionMismatchÚSerializerNotInstalledr   ÚSerializationErrorÚEncodeErrorÚDecodeErrorÚ	HttpErrorÚInconsistencyErrorNc                 C   s   |j |k	r| |¡‚|‚dS )zReraise exception.N)Ú__traceback__Úwith_traceback)ÚtpÚvalueÚtb© r   ú4/tmp/pip-unpacked-wheel-hqfrjlvz/kombu/exceptions.pyr      s    

r   c                   @   s   e Zd ZdZdS )r   z)Common subclass for all Kombu exceptions.N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r      s   r   c                   @   s   e Zd ZdZdS )r   z/Recoverable message transport connection error.Nr   r   r   r   r   r      s   r   c                   @   s   e Zd ZdZdS )r   z(Failed to serialize/deserialize content.Nr   r   r   r   r   r   !   s   r   c                   @   s   e Zd ZdZdS )r   zCannot encode object.Nr   r   r   r   r   r   %   s   r   c                   @   s   e Zd ZdZdS )r   zCannot decode object.Nr   r   r   r   r   r   )   s   r   c                   @   s   e Zd ZdZdS )r	   z:Trying to call channel dependent method on unbound entity.Nr   r   r   r   r   r	   -   s   r	   c                   @   s   e Zd ZdZdS )r
   z*The message has already been acknowledged.Nr   r   r   r   r   r
   1   s   r
   c                   @   s   e Zd ZdZdS )r   zLimit exceeded.Nr   r   r   r   r   r   5   s   r   c                   @   s   e Zd ZdZdS )r   z4Maximum number of simultaneous connections exceeded.Nr   r   r   r   r   r   9   s   r   c                   @   s   e Zd ZdZdS )r   z1Maximum number of simultaneous channels exceeded.Nr   r   r   r   r   r   =   s   r   c                   @   s   e Zd ZdZdS )r   z$Library dependency version mismatch.Nr   r   r   r   r   r   A   s   r   c                   @   s   e Zd ZdZdS )r   z>Support for the requested serialization type is not installed.Nr   r   r   r   r   r   E   s   r   c                   @   s   e Zd ZdZdS )ÚContentDisallowedz*Consumer does not allow this content-type.Nr   r   r   r   r   r"   I   s   r"   c                   @   s   e Zd ZdZdS )r   z‚Data or environment has been found to be inconsistent.

    Depending on the cause it may be possible to retry the operation.
    Nr   r   r   r   r   r   M   s   r   c                       s*   e Zd ZdZd‡ fdd„	Zdd„ Z‡  ZS )r   zHTTP Client Error.Nc                    s&   || _ || _|| _tƒ  |||¡ d S )N)ÚcodeÚmessageÚresponseÚsuperÚ__init__)Úselfr#   r$   r%   ©Ú	__class__r   r   r'   W   s    zHttpError.__init__c                 C   s
   d  | ¡S )NzHTTP {0.code}: {0.message})Úformat)r(   r   r   r   Ú__str__]   s    zHttpError.__str__)NN)r   r   r    r!   r'   r,   Ú__classcell__r   r   r)   r   r   T   s   r   )N)r!   Úsocketr   r   Zamqpr   r   r   Ú__all__r   Ú	Exceptionr   r   r   r   r   r	   r
   r   r   r   r   r   r"   r   r   r   r   r   r   Ú<module>   s&   
