o
    #6dd                     @  s   d dl mZ d dlm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 )    )annotations)format_exceptionc                   @     e Zd ZdZdS )BrokenResourceErrorz
    Raised when trying to use a resource that has been rendered unusable due to external causes
    (e.g. a send stream whose peer has disconnected).
    N__name__
__module____qualname____doc__ r   r   nC:\Users\jesus\OneDrive\Desktop\erpjis_fastapi\backend\jisbackend\Lib\site-packages\anyio/_core/_exceptions.pyr          r   c                   @  r   )BrokenWorkerProcesszv
    Raised by :func:`run_sync_in_process` if the worker process terminates abruptly or otherwise
    misbehaves.
    Nr   r   r   r   r   r      r   r   c                      "   e Zd ZdZd fddZ  ZS )BusyResourceErrorzYRaised when two tasks are trying to read from or write to the same resource concurrently.actionstrc                      t  d| d d S )NzAnother task is already z this resourcesuper__init__)selfr   	__class__r   r   r      s   zBusyResourceError.__init__)r   r   r   r   r	   r
   r   __classcell__r   r   r   r   r      s    r   c                   @  r   )ClosedResourceErrorz:Raised when trying to use a resource that has been closed.Nr   r   r   r   r   r      r   r   c                      s"   e Zd ZdZd fddZ  ZS )	DelimiterNotFoundz
    Raised during :meth:`~anyio.streams.buffered.BufferedByteReceiveStream.receive_until` if the
    maximum number of bytes has been read without the delimiter being found.
    	max_bytesintreturnNonec                   r   )Nz,The delimiter was not found among the first z bytesr   )r   r   r   r   r   r   %   s   
zDelimiterNotFound.__init__)r   r   r    r!   r   r   r   r   r   r      s    r   c                   @  r   )EndOfStreamzQRaised when trying to read from a stream that has been closed from the other end.Nr   r   r   r   r   r"   +   r   r"   c                   @  s2   e Zd ZU dZdZded< dddZdd	d
ZdS )ExceptionGroupz
    Raised when multiple exceptions have been raised in a task group.

    :var ~typing.Sequence[BaseException] exceptions: the sequence of exceptions raised together
    z----------------------------
zlist[BaseException]
exceptionsr    r   c                 C  s2   dd | j D }t| j  d| j | j| S )Nc                 S  s$   g | ]}d  tt|||jqS ) )joinr   type__traceback__.0excr   r   r   
<listcomp>;   s    z*ExceptionGroup.__str__.<locals>.<listcomp>z+ exceptions were raised in the task group:
)r$   len	SEPARATORr&   )r   Z
tracebacksr   r   r   __str__:   s   
zExceptionGroup.__str__c                 C  s,   d dd | jD }d| jj d| dS )Nz, c                 s  s    | ]}t |V  qd S )N)reprr)   r   r   r   	<genexpr>E   s    z*ExceptionGroup.__repr__.<locals>.<genexpr><z: >)r&   r$   r   r   )r   Zexception_reprsr   r   r   __repr__D   s   zExceptionGroup.__repr__N)r    r   )r   r   r	   r
   r.   __annotations__r/   r4   r   r   r   r   r#   /   s   
 

r#   c                      r   )IncompleteReada  
    Raised during :meth:`~anyio.streams.buffered.BufferedByteReceiveStream.receive_exactly` or
    :meth:`~anyio.streams.buffered.BufferedByteReceiveStream.receive_until` if the
    connection is closed before the requested amount of bytes has been read.
    r    r!   c                   s   t  d d S )NzBThe stream was closed before the read operation could be completedr   )r   r   r   r   r   P   s   zIncompleteRead.__init__)r    r!   r   r   r   r   r   r6   I   s    r6   c                   @  r   )TypedAttributeLookupErrorz
    Raised by :meth:`~anyio.TypedAttributeProvider.extra` when the given typed attribute is not
    found and no default value has been given.
    Nr   r   r   r   r   r7   V   r   r7   c                   @  r   )
WouldBlockz8Raised by ``X_nowait`` functions if ``X()`` would block.Nr   r   r   r   r   r8   ]   r   r8   N)
__future__r   	tracebackr   	Exceptionr   r   r   r   r   r"   BaseExceptionr#   r6   LookupErrorr7   r8   r   r   r   r   <module>   s    