
    e                     l    d Z ddlmZ  G d de      Z G d de      Z G d de      Z G d	 d
e      Zy)zJOSE errors.    )Anyc                       e Zd ZdZy)ErrorzGeneric JOSE Error.N__name__
__module____qualname____doc__     //usr/lib/python3/dist-packages/josepy/errors.pyr   r      s    r   r   c                   (     e Zd ZdZdef fdZ xZS )DeserializationErrorzJSON deserialization error.returnc                 >    dj                  t        | 	               S )NzDeserialization error: {0})formatsuper__str__)self	__class__s    r   r   zDeserializationError.__str__   s    +2257?3DEEr   )r   r   r	   r
   strr   __classcell__r   s   @r   r   r   	   s    %F F Fr   r   c                       e Zd ZdZy)SerializationErrorzJSON serialization error.Nr   r   r   r   r   r      s    #r   r   c                   <     e Zd ZdZdededdf fdZdefdZ xZS )UnrecognizedTypeErrorz~Unrecognized type error.

    :ivar str typ: The unrecognized type of the JSON object.
    :ivar jobj: Full JSON object.

    typjobjr   Nc                 R    || _         || _        t        |   t	        |              y )N)r   r   r   __init__r   )r   r   r   r   s      r   r!   zUnrecognizedTypeError.__init__   s"    	T#r   c                 N    dj                  | j                  | j                        S )Nz){0} was not recognized, full message: {1})r   r   r   )r   s    r   r   zUnrecognizedTypeError.__str__!   s    :AA$((DIIVVr   )	r   r   r	   r
   r   r   r!   r   r   r   s   @r   r   r      s0    $C $s $t $
W Wr   r   N)r
   typingr   	Exceptionr   r   r   r   r   r   r   <module>r%      s@     I F5 F$ $W0 Wr   