U
    ­Ö«[B  ã                   @   s˜   d dl mZmZmZ G dd„ deƒZG dd„ deƒZG dd„ deeƒZG dd	„ d	eeƒZG d
d„ de	eƒZ	G dd„ de
eƒZ
G dd„ deƒZdd„ ZdS )é    )Úabsolute_importÚdivisionÚprint_functionc                   @   s   e Zd ZdZdS )ÚCryptoErrorz4
    Base exception for all nacl related errors
    N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r   r   ú1/usr/lib/python3/dist-packages/nacl/exceptions.pyr      s   r   c                   @   s   e Zd ZdZdS )ÚBadSignatureErrorzD
    Raised when the signature was forged or otherwise corrupt.
    Nr   r   r   r   r   r      s   r   c                   @   s   e Zd ZdS )ÚRuntimeErrorN©r   r   r	   r   r   r   r   r      s   r   c                   @   s   e Zd ZdS )ÚAssertionErrorNr   r   r   r   r   r   "   s   r   c                   @   s   e Zd ZdS )Ú	TypeErrorNr   r   r   r   r   r   &   s   r   c                   @   s   e Zd ZdS )Ú
ValueErrorNr   r   r   r   r   r   *   s   r   c                   @   s   e Zd ZdS )ÚInvalidkeyErrorNr   r   r   r   r   r   .   s   r   c                 O   sF   d}|  dt¡}|r.t| t| ¡ d ƒ¡ƒ‚| dkr:dS ||Ž ‚dS )a„  
    Return if a condition is true, otherwise raise a caller-configurable
    :py:class:`Exception`
    :param bool cond: the condition to be checked
    :param sequence args: the arguments to be passed to the exception's
                          constructor
    The only accepted named parameter is `raising` used to configure the
    exception to be raised if `cond` is not `True`
    z8check_condition() got an unexpected keyword argument {0}Úraisingr   TN)Úpopr   r   ÚformatÚreprÚpopitem)ZcondÚargsÚkwdsZ
_CHK_UNEXPr   r   r   r   Úensure2   s    
r   N)Z
__future__r   r   r   Ú	Exceptionr   r   r   r   r   r   r   r   r   r   r   r   Ú<module>   s   