
    "f-	                         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dS )zException classes.c                       e Zd ZdZddZdS )UnpackErrorzUnpack error.Nc                 v    d| dt          |          j         d| }t                              | |           d S )N

z$ occurred during unpack operation:

type__name__	Exception__init__)selfdump	exceptionmessages       S/mounts/lovelace/software/anaconda3/lib/python3.11/site-packages/plum/exceptions.pyr
   zUnpackError.__init__   sY    4  I'   	
 	4)))))    )NNr   
__module____qualname____doc__r
    r   r   r   r      s.        * * * * * *r   r   c                       e Zd ZdZddZdS )ExcessMemoryErrorz&Leftover bytes after unpack operation.r   c                 n    t          |           d}t                              | |           || _        d S )Nz unconsumed bytes)lenr	   r
   extra_bytes)r   r   r   s      r   r
   zExcessMemoryError.__init__   s<    %%8884)))&r   N)r   r   r   r   r   r   r      s.        00' ' ' ' ' 'r   r   c                   $     e Zd ZdZd fd	Z xZS )ImplementationErrorz Unexpected implementation error. c                 R    |sd}t                                          |           d S )Nad  One of the plum types used in the pack/unpack operation contains an implementation error. The operation generated an exception when first performed without a dump (for efficiency). But when the operation was repeated with a dump (for a better exception message) the exception did not re-occur. Please report the inconsistent behavior to the type developer.)superr
   )r   r   	__class__s     r   r
   zImplementationError.__init__#   s6     	C  	!!!!!r   )r   )r   r   r   r   r
   __classcell__)r    s   @r   r   r      sC        **
" 
" 
" 
" 
" 
" 
" 
" 
" 
"r   r   c                       e Zd ZdZd ZdS )InsufficientMemoryErrorz Too few bytes to unpack an item.c                 <    t                               | |           d S )N)r	   r
   )r   r   s     r   r
   z InsufficientMemoryError.__init__4   s    4)))))r   Nr   r   r   r   r#   r#   0   s)        *** * * * *r   r#   c                       e Zd ZdZddZdS )	PackErrorzPack operation error.r   Nc                     |r	|d| dz  }|r|t          |          j         d| z  }t                              | |           d S )Nr   z" occurred during pack operation:

r   )r   r   r   r   s       r   r
   zPackError.__init__=   sg     	)(d((((G 	d$y//2ccXacccG4)))))r   )r   NNr   r   r   r   r&   r&   9   s.        * * * * * *r   r&   c                       e Zd ZdZdS )	SizeErrorz&Size varies from instance to instance.N)r   r   r   r   r   r   r   r)   r)   G   s        0000r   r)   N)r   r	   r   r   r   r#   r&   r)   r   r   r   <module>r*      s    
* 
* 
* 
* 
*) 
* 
* 
*' ' ' ' ' ' ' '" " " " ") " " ""* * * * *k * * ** * * * *	 * * *1 1 1 1 1	 1 1 1 1 1r   