
    )Jf'                        d Z  G d de          Z G d de          Z G d de          Z G d de          Z G d	 d
e          Z G d de          Z G d de          Z G d de          Z	 G d de          Z
 G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d de          Z G d d e          Z G d! d"e          Z G d# d$e          Z G d% d&e          Z G d' d(e          Z G d) d*e          Z G d+ d,e          Z G d- d.e          Z G d/ d0e          Z G d1 d2e          Z G d3 d4e          Z G d5 d6e          Z G d7 d8e          Z G d9 d:e          Z G d; d<e          Z G d= d>e          Z  G d? d@e          Z! G dA dBe          Z" G dC dDe          Z# G dE dFe          Z$ G dG dHe          Z% G dI dJe#          Z&dKS )LzPika specific exceptionsc                       e Zd Zd ZdS )	AMQPErrorc                 .    | j         j        d| j        S )Nz*: An unspecified AMQP error has occurred; 	__class____name__argsselfs    R/home/alex/cs2snipeproduction/venv/lib/python3.11/site-packages/pika/exceptions.py__repr__zAMQPError.__repr__   s     N###TYY0 	0    Nr   
__module____qualname__r    r   r   r   r      s#        0 0 0 0 0r   r   c                       e Zd Zd ZdS )AMQPConnectionErrorc                     t          | j                  dk    r7d                    | j        j        | j        d         | j        d                   S d                    | j        j        | j                  S )N   z{}: ({}) {}       z{}: {})lenr   formatr   r   r	   s    r   r   zAMQPConnectionError.__repr__   sb    ty>>Q ''(?1(,	!6 6 6 ??4>#:DIFFFr   Nr   r   r   r   r   r      s(        G G G G Gr   r   c                       e Zd ZdZdS )ConnectionOpenAbortedz'Client closed connection while opening.Nr   r   r   __doc__r   r   r   r   r      s        1111r   r   c                       e Zd ZdZdS )StreamLostErrorzStream (TCP) connection lost.Nr   r   r   r   r   r              ''''r   r   c                       e Zd Zd ZdS )IncompatibleProtocolErrorc                 .    | j         j        d| j        S )Nz8: The protocol returned by the server is not supported: r   r	   s    r   r   z"IncompatibleProtocolError.__repr__    s#     '''			r   Nr   r   r   r   r"   r"      s#            r   r"   c                       e Zd Zd ZdS )AuthenticationErrorc                 <    | j         j        d| j        d         dS )Nz3: Server and client could not negotiate use of the r   z authentication mechanismr   r	   s    r   r   zAuthenticationError.__repr__*   s'    .2n.E.E.E.2illl< 	=r   Nr   r   r   r   r%   r%   (   s#        = = = = =r   r%   c                       e Zd Zd ZdS )ProbableAuthenticationErrorc                 .    | j         j        d| j        S )Nz\: Client was disconnected at a connection stage indicating a probable authentication error: r   r	   s    r   r   z$ProbableAuthenticationError.__repr__2   #     '''			r   Nr   r   r   r   r(   r(   0   #            r   r(   c                       e Zd Zd ZdS )ProbableAccessDeniedErrorc                 .    | j         j        d| j        S )Nzv: Client was disconnected at a connection stage indicating a probable denial of access to the specified virtual host: r   r	   s    r   r   z"ProbableAccessDeniedError.__repr__=   r*   r   Nr   r   r   r   r-   r-   ;   r+   r   r-   c                       e Zd Zd ZdS )NoFreeChannelsc                      d| j         j        z  S )Nz/%s: The connection has run out of free channelsr   r   r	   s    r   r   zNoFreeChannels.__repr__H   s    @N#% 	%r   Nr   r   r   r   r0   r0   F   #        % % % % %r   r0   c                   "     e Zd ZdZ fdZ xZS )ConnectionWrongStateErrorz9Connection is in wrong state for the requested operation.c                 ~    | j         r't          t          |                                           S d| j        j        z  S )NzA%s: The connection is in wrong state for the requested operation.)r   superr5   r   r   r   )r
   r   s    r   r   z"ConnectionWrongStateError.__repr__P   sA    9 	<2D99BBDDD!#'>#:; <r   )r   r   r   r   r   __classcell__r   s   @r   r5   r5   M   s>        CC< < < < < < < < <r   r5   c                   P     e Zd Z fdZd Zed             Zed             Z xZS )ConnectionClosedc                     t          t          |                               t          |          t	          |                     dS )aQ  

        :param int reply_code: reply-code that was used in user's or broker's
            `Connection.Close` method. NEW in v1.0.0
        :param str reply_text: reply-text that was used in user's or broker's
            `Connection.Close` method. Human-readable string corresponding to
            `reply_code`. NEW in v1.0.0
        N)r7   r;   __init__intstrr
   
reply_code
reply_textr   s      r   r=   zConnectionClosed.__init__Z   s8     	%%..s:JPPPPPr   c                 X    d                     | j        j        | j        | j                  S Nz{}: ({}) {!r}r   r   r   rA   rB   r	   s    r   r   zConnectionClosed.__repr__e   *    %%dn&=t&*o7 7 	7r   c                     | j         d         S z, NEW in v1.0.0
        :rtype: int

        r   r   r	   s    r   rA   zConnectionClosed.reply_codei        y|r   c                     | j         d         S z, NEW in v1.0.0
        :rtype: str

        r   rI   r	   s    r   rB   zConnectionClosed.reply_textq   rJ   r   )	r   r   r   r=   r   propertyrA   rB   r8   r9   s   @r   r;   r;   X   s        	Q 	Q 	Q 	Q 	Q7 7 7   X   X    r   r;   c                       e Zd ZdZdS )ConnectionClosedByBrokerzConnection.Close from broker.Nr   r   r   r   rO   rO   z   r    r   rO   c                       e Zd ZdZdS )ConnectionClosedByClientz0Connection was closed at request of Pika client.Nr   r   r   r   rQ   rQ   ~   s        ::::r   rQ   c                       e Zd ZdZdS )ConnectionBlockedTimeoutz>RabbitMQ-specific: timed out waiting for connection.unblocked.Nr   r   r   r   rS   rS      s        HHHHr   rS   c                       e Zd ZdZdS )AMQPHeartbeatTimeoutz6Connection was dropped as result of heartbeat timeout.Nr   r   r   r   rU   rU              @@@@r   rU   c                       e Zd Zd ZdS )AMQPChannelErrorc                 L    d                     | j        j        | j                  S )Nz{}: {!r})r   r   r   r   r	   s    r   r   zAMQPChannelError.__repr__   s      !8$)DDDr   Nr   r   r   r   rX   rX      s(        E E E E Er   rX   c                       e Zd ZdZdS )ChannelWrongStateErrorz6Channel is in wrong state for the requested operation.Nr   r   r   r   r[   r[      rV   r   r[   c                   T     e Zd ZdZ fdZd Zed             Zed             Z xZ	S )ChannelClosedz/The channel closed by client or by broker

    c                     t          t          |                               t          |          t	          |                     dS )a  

        :param int reply_code: reply-code that was used in user's or broker's
            `Channel.Close` method. One of the AMQP-defined Channel Errors.
            NEW in v1.0.0
        :param str reply_text: reply-text that was used in user's or broker's
            `Channel.Close` method. Human-readable string corresponding to
            `reply_code`;
            NEW in v1.0.0

        N)r7   r]   r=   r>   r?   r@   s      r   r=   zChannelClosed.__init__   s7     	mT""++C
OOS__MMMMMr   c                 X    d                     | j        j        | j        | j                  S rD   rE   r	   s    r   r   zChannelClosed.__repr__   rF   r   c                     | j         d         S rH   rI   r	   s    r   rA   zChannelClosed.reply_code   rJ   r   c                     | j         d         S rL   rI   r	   s    r   rB   zChannelClosed.reply_text   rJ   r   )
r   r   r   r   r=   r   rM   rA   rB   r8   r9   s   @r   r]   r]      s         N N N N N7 7 7   X   X    r   r]   c                       e Zd ZdZdS )ChannelClosedByBrokerz`Channel.Close` from broker; may be passed as reason to channel's
    on-closed callback of non-blocking connection adapters or raised by
    `BlockingConnection`.

    NEW in v1.0.0
    Nr   r   r   r   rc   rc                 r   rc   c                       e Zd ZdZdS )ChannelClosedByClientzChannel closed by client upon receipt of `Channel.CloseOk`; may be passed
    as reason to channel's on-closed callback of non-blocking connection
    adapters, but not raised by `BlockingConnection`.

    NEW in v1.0.0
    Nr   r   r   r   rf   rf      rd   r   rf   c                       e Zd Zd ZdS )DuplicateConsumerTagc                 :    | j         j        d| j        d         S )Nz>: The consumer tag specified already exists for this channel: r   r   r	   s    r   r   zDuplicateConsumerTag.__repr__   s&    !%!8!8!8$)A,,H 	Ir   Nr   r   r   r   rh   rh      s(        I I I I Ir   rh   c                       e Zd Zd ZdS )ConsumerCancelledc                      d| j         j        z  S )Nz%s: Server cancelled consumerr2   r	   s    r   r   zConsumerCancelled.__repr__   s    .1HHHr   Nr   r   r   r   rk   rk      s(        I I I I Ir   rk   c                   (     e Zd ZdZ fdZd Z xZS )UnroutableErrora-  Exception containing one or more unroutable messages returned by broker
    via Basic.Return.

    Used by BlockingChannel.

    In publisher-acknowledgements mode, this is raised upon receipt of Basic.Ack
    from broker; in the event of Basic.Nack from broker, `NackError` is raised
    instead
    c                     t          t          |                               dt          |          z             || _        dS )
        :param sequence(blocking_connection.ReturnedMessage) messages: Sequence
            of returned unroutable messages
        z!%s unroutable message(s) returnedN)r7   rn   r=   r   messagesr
   rq   r   s     r   r=   zUnroutableError.__init__   sE    
 	ot$$--/3x==A	C 	C 	C !r   c                 H    d| j         j        t          | j                  fz  S Nz-%s: %i unroutable messages returned by brokerr   r   r   rq   r	   s    r   r   zUnroutableError.__repr__   )    >N#S%7%7B9 9 	9r   r   r   r   r   r=   r   r8   r9   s   @r   rn   rn      sQ         ! ! ! ! !9 9 9 9 9 9 9r   rn   c                   (     e Zd ZdZ fdZd Z xZS )	NackErrorzThis exception is raised when a message published in
    publisher-acknowledgements mode is Nack'ed by the broker.

    Used by BlockingChannel.
    c                     t          t          |                               dt          |          z             || _        dS )rp   z%s message(s) NACKedN)r7   ry   r=   r   rq   rr   s     r   r=   zNackError.__init__   s>    
 	i	 	H3s8}}EFFF r   c                 H    d| j         j        t          | j                  fz  S rt   ru   r	   s    r   r   zNackError.__repr__  rv   r   rw   r9   s   @r   ry   ry      sQ         ! ! ! ! !9 9 9 9 9 9 9r   ry   c                       e Zd Zd ZdS )InvalidChannelNumberc                 :    | j         j        d| j        d         S )Nz0: An invalid channel number has been specified: r   r   r	   s    r   r   zInvalidChannelNumber.__repr__  $    N###TYq\\3 	3r   Nr   r   r   r   r}   r}     #        3 3 3 3 3r   r}   c                       e Zd Zd ZdS )ProtocolSyntaxErrorc                      d| j         j        z  S )Nz1%s: An unspecified protocol syntax error occurredr2   r	   s    r   r   zProtocolSyntaxError.__repr__  s    BN#% 	%r   Nr   r   r   r   r   r     r3   r   r   c                       e Zd Zd ZdS )UnexpectedFrameErrorc                 :    | j         j        d| j        d         S )Nz$: Received a frame out of sequence: r   r   r	   s    r   r   zUnexpectedFrameError.__repr__  r   r   Nr   r   r   r   r   r     r   r   r   c                       e Zd Zd ZdS )ProtocolVersionMismatchc                 V    | j         j        d| j        d         d| j        d         S )Nz#: Protocol versions did not match: r   z vs r   r   r	   s    r   r   z ProtocolVersionMismatch.__repr__"  s2    N###TYq\\\49Q<<A 	Ar   Nr   r   r   r   r   r      (        A A A A Ar   r   c                       e Zd Zd ZdS )BodyTooLongErrorc                 R    d| j         j        | j        d         | j        d         fz  S )NzL%s: Received too many bytes for a message delivery: Received %i, expected %ir   r   r   r	   s    r   r   zBodyTooLongError.__repr__)  s2    +.2n.E.2ilDIaL.JJ 	Kr   Nr   r   r   r   r   r   '  s(        K K K K Kr   r   c                       e Zd Zd ZdS )InvalidFrameErrorc                 :    | j         j        d| j        d         S )Nz: Invalid frame received: r   r   r	   s    r   r   zInvalidFrameError.__repr__1  s'    37>3J3J3J379Q<<A 	Ar   Nr   r   r   r   r   r   /  r   r   r   c                       e Zd Zd ZdS )InvalidFieldTypeExceptionc                 :    | j         j        d| j        d         S )N: Unsupported field kind r   r   r	   s    r   r   z"InvalidFieldTypeException.__repr__8  s'    26.2I2I2I26)A,,@ 	@r   Nr   r   r   r   r   r   6  s(        @ @ @ @ @r   r   c                       e Zd Zd ZdS )UnsupportedAMQPFieldExceptionc                 T    | j         j        dt          | j        d                   S )Nr   r   )r   r   typer   r	   s    r   r   z&UnsupportedAMQPFieldException.__repr__?  s0    26.2I2I2I26ty|2D2D2DF 	Fr   Nr   r   r   r   r   r   =  s(        F F F F Fr   r   c                       e Zd ZdS )MethodNotImplementedN)r   r   r   r   r   r   r   r   D  s        Dr   r   c                       e Zd Zd ZdS )ChannelErrorc                      d| j         j        z  S )Nz2%s: An unspecified error occurred with the Channelr2   r	   s    r   r   zChannelError.__repr__J  s    CN#% 	%r   Nr   r   r   r   r   r   H  r3   r   r   c                       e Zd ZdZdS )ReentrancyErrorzThe requested operation would result in unsupported recursion or
    reentrancy.

    Used by BlockingConnection/BlockingChannel

    Nr   r   r   r   r   r   O  rd   r   r   c                       e Zd Zd ZdS )ShortStringTooLongc                 :    d| j         j        | j        d         fz  S )Nz9%s: AMQP Short String can contain up to 255 bytes: %.300sr   r   r	   s    r   r   zShortStringTooLong.__repr__Z  s&     N3TYq\BC 	Dr   Nr   r   r   r   r   r   X  s(        D D D D Dr   r   c                       e Zd Zd ZdS )DuplicateGetOkCallbackc                      d| j         j        z  S )Nz`%s: basic_get can only be called again after the callback for the previous basic_get is executedr2   r	   s    r   r   zDuplicateGetOkCallback.__repr__a  s    57;~7NO 	Pr   Nr   r   r   r   r   r   _  s(        P P P P Pr   r   N)'r   	Exceptionr   r   r   r   r"   r%   r(   r-   r0   r5   r;   rO   rQ   rS   rU   rX   r[   r]   rc   rf   rh   rk   rn   ry   r}   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   <module>r      s    0 0 0 0 0	 0 0 0G G G G G) G G G2 2 2 2 2/ 2 2 2( ( ( ( () ( ( (     3   = = = = =- = = =    "5        3   % % % % %( % % %< < < < < 3 < < <    *   D( ( ( ( (/ ( ( (; ; ; ; ;/ ; ; ;I I I I I2 I I IA A A A A. A A AE E E E Ey E E EA A A A A- A A A% % % % %$ % % %P    M       M   I I I I I+ I I II I I I I( I I I9 9 9 9 9& 9 9 949 9 9 9 9  9 9 9,3 3 3 3 39 3 3 3% % % % %) % % %3 3 3 3 3. 3 3 3A A A A A1 A A AK K K K K* K K KA A A A A+ A A A@ @ @ @ @ 3 @ @ @F F F F F$7 F F F	 	 	 	 	9 	 	 	% % % % %9 % % %    i   D D D D D D D DP P P P P\ P P P P Pr   