B
    öÀ„\ã  ã               @   s¸   d 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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 )a  
    sphinx.errors
    ~~~~~~~~~~~~~

    Contains SphinxError and a few subclasses (in an extra module to avoid
    circular import problems).

    :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
c               @   s   e Zd ZdZdZdS )ÚSphinxErrora»  Base class for Sphinx errors.

    This is the base class for "nice" exceptions.  When such an exception is
    raised, Sphinx will abort the build and present the exception category and
    message to the user.

    Extensions are encouraged to derive from this exception for their custom
    errors.

    Exceptions *not* derived from :exc:`SphinxError` are treated as unexpected
    and shown to the user with a part of the traceback (and the full traceback
    saved in a temporary file).

    .. attribute:: category

       Description of the exception "category", used in converting the
       exception to a string ("category: message").  Should be set accordingly
       in subclasses.
    zSphinx errorN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úcategory© r   r   ú,lib/python3.7/site-packages/sphinx/errors.pyr      s   r   c               @   s   e Zd ZdZdZdS )ÚSphinxWarningzWarning, treated as error.zWarning, treated as errorN)r   r   r   r   r   r   r   r   r   r	   )   s   r	   c               @   s   e Zd ZdZdZdS )ÚApplicationErrorz!Application initialization error.zApplication errorN)r   r   r   r   r   r   r   r   r   r
   .   s   r
   c               @   s.   e Zd ZdZdZd
dd„Zdd„ Zdd	„ ZdS )ÚExtensionErrorzExtension error.zExtension errorNc             C   s   t  | |¡ || _|| _d S )N)r   Ú__init__ÚmessageÚorig_exc)Úselfr   r   r   r   r   r   7   s    zExtensionError.__init__c             C   s.   | j rd| jj| j| j f S d| jj| jf S )Nz
%s(%r, %r)z%s(%r))r   Ú	__class__r   r   )r   r   r   r   Ú__repr__=   s    zExtensionError.__repr__c             C   s"   t  | ¡}| jrd|| jf S |S )Nz%s (exception: %s))r   Ú__str__r   )r   Z
parent_strr   r   r   r   D   s    
zExtensionError.__str__)N)r   r   r   r   r   r   r   r   r   r   r   r   r   3   s
   
r   c               @   s   e Zd ZdZdZdS )ÚBuildEnvironmentErrorzBuildEnvironment error.zBuildEnvironment errorN)r   r   r   r   r   r   r   r   r   r   L   s   r   c               @   s   e Zd ZdZdZdS )ÚConfigErrorzConfiguration error.zConfiguration errorN)r   r   r   r   r   r   r   r   r   r   Q   s   r   c               @   s   e Zd ZdZdZdS )ÚDocumentErrorzDocument error.zDocument errorN)r   r   r   r   r   r   r   r   r   r   V   s   r   c               @   s   e Zd ZdZdZdS )Ú
ThemeErrorzTheme error.zTheme errorN)r   r   r   r   r   r   r   r   r   r   [   s   r   c               @   s   e Zd ZdZdZdS )ÚVersionRequirementErrorz"Incompatible Sphinx version error.zSphinx version errorN)r   r   r   r   r   r   r   r   r   r   `   s   r   c               @   s$   e Zd ZdZdZdd„ Zdd„ ZdS )ÚSphinxParallelErrorzSphinx parallel build error.zSphinx parallel build errorc             C   s   || _ || _d S )N)r   Ú	traceback)r   r   r   r   r   r   r   j   s    zSphinxParallelError.__init__c             C   s   | j S )N)r   )r   r   r   r   r   o   s    zSphinxParallelError.__str__N)r   r   r   r   r   r   r   r   r   r   r   r   e   s   r   c               @   s   e Zd ZdZdd„ ZdS )ÚPycodeErrorz)Pycode Python source code analyser error.c             C   s.   | j d }t| j ƒdkr*|d| j d  7 }|S )Né    é   z (exception was: %r))ÚargsÚlen)r   Zresr   r   r   r   w   s    
zPycodeError.__str__N)r   r   r   r   r   r   r   r   r   r   t   s   r   N)r   Ú	Exceptionr   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   Ú<module>   s   