
    f'                     6   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&yK)LzPika specific exceptionsc                       e Zd Zd Zy)	AMQPErrorc                 L    | j                   j                  d| j                  S )Nz*: An unspecified AMQP error has occurred; 	__class____name__argsselfs    J/var/www/cs2snipe.com/venv/lib/python3.12/site-packages/pika/exceptions.py__repr__zAMQPError.__repr__   s    NN##TYY0 	0    Nr   
__module____qualname__r    r   r   r   r      s    0r   r   c                       e Zd Zd Zy)AMQPConnectionErrorc                    t        | j                        dk(  rAdj                  | j                  j                  | j                  d   | j                  d         S dj                  | j                  j                  | j                        S )N   z{}: ({}) {}       z{}: {})lenr   formatr   r   r	   s    r   r   zAMQPConnectionError.__repr__   sg    tyy>Q ''(?(?1(,		!6 6 ??4>>#:#:DIIFFr   Nr   r   r   r   r   r      s    Gr   r   c                       e Zd ZdZy)ConnectionOpenAbortedz'Client closed connection while opening.Nr   r   r   __doc__r   r   r   r   r      s    1r   r   c                       e Zd ZdZy)StreamLostErrorzStream (TCP) connection lost.Nr   r   r   r   r   r          'r   r   c                       e Zd Zd Zy)IncompatibleProtocolErrorc                 L    | 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y)AuthenticationErrorc                 T    | 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$    .2nn.E.E.2iil< 	=r   Nr   r   r   r   r%   r%   (   s    =r   r%   c                       e Zd Zd Zy)ProbableAuthenticationErrorc                 L    | 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y)ProbableAccessDeniedErrorc                 L    | 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y)NoFreeChannelsc                 4    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    @NN##% 	%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                 r    | 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   s7    992DBDD!#'>>#:#:; <r   )r   r   r   r   r   __classcell__r   s   @r   r5   r5   M   s    C< <r   r5   c                   D     e Zd Z fdZd Zed        Zed        Z xZS )ConnectionClosedc                 R    t         t        |   t        |      t	        |             y)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   s     	.s:JPr   c                 x    dj                  | j                  j                  | j                  | j                        S Nz{}: ({}) {!r}r   r   r   rA   rB   r	   s    r   r   zConnectionClosed.__repr__e   .    %%dnn&=&=t&*oo7 	7r   c                      | j                   d   S z, NEW in v1.0.0
        :rtype: int

        r   r   r	   s    r   rA   zConnectionClosed.reply_codei        yy|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   s6    	Q7    r   r;   c                       e Zd ZdZy)ConnectionClosedByBrokerzConnection.Close from broker.Nr   r   r   r   rO   rO   z   r    r   rO   c                       e Zd ZdZy)ConnectionClosedByClientz0Connection was closed at request of Pika client.Nr   r   r   r   rQ   rQ   ~   s    :r   rQ   c                       e Zd ZdZy)ConnectionBlockedTimeoutz>RabbitMQ-specific: timed out waiting for connection.unblocked.Nr   r   r   r   rS   rS      s    Hr   rS   c                       e Zd ZdZy)AMQPHeartbeatTimeoutz6Connection was dropped as result of heartbeat timeout.Nr   r   r   r   rU   rU          @r   rU   c                       e Zd Zd Zy)AMQPChannelErrorc                 b    dj                  | j                  j                  | j                        S )Nz{}: {!r})r   r   r   r   r	   s    r   r   zAMQPChannelError.__repr__   s#      !8!8$))DDr   Nr   r   r   r   rX   rX      s    Er   rX   c                       e Zd ZdZy)ChannelWrongStateErrorz6Channel is in wrong state for the requested operation.Nr   r   r   r   r[   r[      rV   r   r[   c                   H     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                 R    t         t        |   t        |      t	        |             y)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__   s     	mT+C
OS_Mr   c                 x    dj                  | 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7    r   r]   c                       e Zd ZdZy)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y)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y)DuplicateConsumerTagc                 R    | 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$))A,H 	Ir   Nr   r   r   r   rh   rh      s    Ir   rh   c                       e Zd Zd Zy)ConsumerCancelledc                 4    d| j                   j                  z  S )Nz%s: Server cancelled consumerr2   r	   s    r   r   zConsumerCancelled.__repr__   s    .1H1HHHr   Nr   r   r   r   rk   rk      s    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                 R    t         t        |   dt        |      z         || _        y)
        :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__   s*    
 	ot-/3x=A	C !r   c                 ^    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__   -    >NN##S%7B9 9 	9r   r   r   r   r   r=   r   r8   r9   s   @r   rn   rn      s    !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                 R    t         t        |   dt        |      z         || _        y)rp   z%s message(s) NACKedN)r7   ry   r=   r   rq   rr   s     r   r=   zNackError.__init__   s(    
 	i	3s8}EF r   c                 ^    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      s    !9r   ry   c                       e Zd Zd Zy)InvalidChannelNumberc                 R    | j                   j                  d| j                  d   S )Nz0: An invalid channel number has been specified: r   r   r	   s    r   r   zInvalidChannelNumber.__repr__  #    NN##TYYq\3 	3r   Nr   r   r   r   r}   r}         3r   r}   c                       e Zd Zd Zy)ProtocolSyntaxErrorc                 4    d| j                   j                  z  S )Nz1%s: An unspecified protocol syntax error occurredr2   r	   s    r   r   zProtocolSyntaxError.__repr__  s    BNN##% 	%r   Nr   r   r   r   r   r     r3   r   r   c                       e Zd Zd Zy)UnexpectedFrameErrorc                 R    | 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y)ProtocolVersionMismatchc                 r    | 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__"  s/    NN##TYYq\499Q<A 	Ar   Nr   r   r   r   r   r          Ar   r   c                       e Zd Zd Zy)BodyTooLongErrorc                 n    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__)  s;    +.2nn.E.E.2iilDIIaL.JJ 	Kr   Nr   r   r   r   r   r   '  s    Kr   r   c                       e Zd Zd Zy)InvalidFrameErrorc                 R    | j                   j                  d| j                  d   S )Nz: Invalid frame received: r   r   r	   s    r   r   zInvalidFrameError.__repr__1  s&    37>>3J3J3799Q<A 	Ar   Nr   r   r   r   r   r   /  r   r   r   c                       e Zd Zd Zy)InvalidFieldTypeExceptionc                 R    | j                   j                  d| j                  d   S )N: Unsupported field kind r   r   r	   s    r   r   z"InvalidFieldTypeException.__repr__8  s&    26..2I2I26))A,@ 	@r   Nr   r   r   r   r   r   6  s    @r   r   c                       e Zd Zd Zy)UnsupportedAMQPFieldExceptionc                 d    | j                   j                  dt        | j                  d         S )Nr   r   )r   r   typer   r	   s    r   r   z&UnsupportedAMQPFieldException.__repr__?  s+    26..2I2I26tyy|2DF 	Fr   Nr   r   r   r   r   r   =  s    Fr   r   c                       e Zd Zy)MethodNotImplementedN)r   r   r   r   r   r   r   r   D  s    r   r   c                       e Zd Zd Zy)ChannelErrorc                 4    d| j                   j                  z  S )Nz2%s: An unspecified error occurred with the Channelr2   r	   s    r   r   zChannelError.__repr__J  s    CNN##% 	%r   Nr   r   r   r   r   r   H  r3   r   r   c                       e Zd ZdZy)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y)ShortStringTooLongc                 R    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-     NN33TYYq\BC 	Dr   Nr   r   r   r   r   r   X  s    Dr   r   c                       e Zd Zd Zy)DuplicateGetOkCallbackc                 4    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;~~7N7NO 	Pr   Nr   r   r   r   r   r   _  s    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G) G2/ 2() ( 3 =- ="5  3 %( %< 3 <* D(/ (;/ ;I2 IA. AEy EA- A%$ %PM M I+ II( I9& 949  9,39 3%) %3. 3A1 AK* KA+ A@ 3 @F$7 F	9 	%9 %i D DP\ Pr   