U
    Â½„b(  ã                   @   s€   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	dS )é    )Úunicode_literalsc                   @   s   e Zd ZdZdS )ÚCoreAPIExceptionz4
    A base class for all `coreapi` exceptions.
    N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r	   r	   ú6/tmp/pip-unpacked-wheel-07qh9vnj/coreapi/exceptions.pyr      s   r   c                   @   s   e Zd ZdZdS )Ú
ParseErrorzB
    Raised when an invalid Core API encoding is encountered.
    Nr   r	   r	   r	   r
   r      s   r   c                   @   s   e Zd ZdZdS )ÚNoCodecAvailablezR
    Raised when there is no available codec that can handle the given media.
    Nr   r	   r	   r	   r
   r      s   r   c                   @   s   e Zd ZdZdS )ÚNetworkErrorzT
    Raised when the transport layer fails to make a request or get a response.
    Nr   r	   r	   r	   r
   r      s   r   c                   @   s   e Zd ZdZdS )ÚLinkLookupErrorzF
    Raised when `.action` fails to index a link in the document.
    Nr   r	   r	   r	   r
   r   !   s   r   c                   @   s   e Zd ZdZdS )ÚParameterErrorzá
    Raised when the parameters passed do not match the link fields.

    * A required field was not included.
    * An unknown field was included.
    * A field was passed an invalid type for the link location/encoding.
    Nr   r	   r	   r	   r
   r   (   s   r   c                   @   s(   e Zd ZdZdd„ Zdd„ Zdd„ ZdS )	ÚErrorMessagez>
    Raised when the transition returns an error message.
    c                 C   s
   || _ d S ©N)Úerror)Úselfr   r	   r	   r
   Ú__init__7   s    zErrorMessage.__init__c                 C   s   d| j jt| jƒf S )Nz%s(%s))Ú	__class__r   Úreprr   ©r   r	   r	   r
   Ú__repr__:   s    zErrorMessage.__repr__c                 C   s
   t | jƒS r   )Ústrr   r   r	   r	   r
   Ú__str__=   s    zErrorMessage.__str__N)r   r   r   r   r   r   r   r	   r	   r	   r
   r   3   s   r   N)
Ú
__future__r   Ú	Exceptionr   r   r   r   r   r   r   r	   r	   r	   r
   Ú<module>   s   