Format: application/x-python-code
⬇ Download File (4.7 KB)
   1  o
   2  
   3  ;'h�
   4  �@s�ddlmZddlZddlmZddlmZddlmZej	dkr'ddl
   5  mZGdd	�d	e�Z
   6  Gd
   7  d�de�ZGdd
   8  �d
   9  e�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�Zd"d d!�ZdS)#�)�annotationsN)�	Generator)�dedent)�Any)��)�BaseExceptionGroupc@�eZdZdZdS)�BrokenResourceErrorz�
  10      Raised when trying to use a resource that has been rendered unusable due to external
  11      causes (e.g. a send stream whose peer has disconnected).
  12      N��__name__�
  13  __module__�__qualname__�__doc__�rr�MC:\Users\shubh\Videos\agent\nova\Lib\site-packages\anyio/_core/_exceptions.pyr
  14  �r
  15  c@r	)�BrokenWorkerProcessz}
  16      Raised by :meth:`~anyio.to_process.run_sync` if the worker process terminates abruptly or
  17      otherwise misbehaves.
  18      Nrrrrrrrrcs0eZdZdZd
  19  �fdd�Zd�fdd	�Z�ZS)�BrokenWorkerIntepreterzz
  20      Raised by :meth:`~anyio.to_interpreter.run_sync` if an unexpected exception is
  21      raised in the subinterpreter.
  22      �excinforcsP|j}|s|jr|jr|jj�d|j��}n|jjp|j}t��|�||_dS)Nz: )�	formatted�type�msgr�super�__init__r)�selfrr��	__class__rrr s
  23  zBrokenWorkerIntepreter.__init__�return�strcsJz|jj}Wntyt���YSwtdt����d|�d����S)Nz
  24                  z@
  25  
  26                  Uncaught in the interpreter:
  27  
  28                  )rZ
  29  errdisplay�	Exceptionr�__str__r�strip)rrrrrr!,s����zBrokenWorkerIntepreter.__str__)rr)rr)rr
  30  rrrr!�
  31  __classcell__rrrrrsrc�"eZdZdZd�fdd�Z�ZS)�BusyResourceErrorzg
  32      Raised when two tasks are trying to read from or write to the same resource
  33      concurrently.
  34      �actionrc�t��d|�d��dS)NzAnother task is already z this resource�rr)rr&rrrrCszBusyResourceError.__init__)r&r�rr
  35  rrrr#rrrrr%=sr%c@r	)�ClosedResourceErrorz:Raised when trying to use a resource that has been closed.Nrrrrrr*Grr*cs"eZdZdZd�fdd�Z�ZS)	�DelimiterNotFoundz�
  36      Raised during
  37      :meth:`~anyio.streams.buffered.BufferedByteReceiveStream.receive_until` if the
  38      maximum number of bytes has been read without the delimiter being found.
  39      �	max_bytes�intr�Nonecr')Nz,The delimiter was not found among the first z bytesr()rr,rrrrRs
  40  �zDelimiterNotFound.__init__)r,r-rr.r)rrrrr+Ksr+c@r	)�EndOfStreamz[
  41      Raised when trying to read from a stream that has been closed from the other end.
  42      Nrrrrrr/Xrr/cr$)�IncompleteReada
  43      Raised during
  44      :meth:`~anyio.streams.buffered.BufferedByteReceiveStream.receive_exactly` or
  45      :meth:`~anyio.streams.buffered.BufferedByteReceiveStream.receive_until` if the
  46      connection is closed before the requested amount of bytes has been read.
  47      rr.cst��d�dS)NzBThe stream was closed before the read operation could be completedr()rrrrrfs�zIncompleteRead.__init__)rr.r)rrrrr0^sr0c@r	)�TypedAttributeLookupErrorz�
  48      Raised by :meth:`~anyio.TypedAttributeProvider.extra` when the given typed attribute
  49      is not found and no default value has been given.
  50      Nrrrrrr1lrr1c@r	)�
  51  WouldBlockz8Raised by ``X_nowait`` functions if ``X()`` would block.Nrrrrrr2srr2�	exception�
  52  BaseExceptionr�$Generator[BaseException, None, None]ccs4�t|t�r|jD]	}t|�EdHq	dS|VdS)N)�
  53  isinstancer�
  54  exceptions�iterate_exceptions)r3�excrrrr8ws�
  55  
  56  �
  57  r8)r3r4rr5)�
  58  __future__r�sys�collections.abcr�textwrapr�typingr�version_infoZexceptiongrouprr r
  59  rrr%r*r+r/r0�LookupErrorr1r2r8rrrr�<module>s$
  60  #
  61  
  62