ó
öŔ\c           @   s  d  Z  e r d d l m Z n  d e f d     YZ d e f d     YZ d e f d     YZ d	 e f d
     YZ d e f d     YZ	 d e f d     YZ
 d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d S(   s  
    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.
i˙˙˙˙(   t   Anyt   SphinxErrorc           B   s   e  Z d  Z d Z RS(   sť  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.
    s   Sphinx error(   t   __name__t
   __module__t   __doc__t   category(    (    (    s,   lib/python2.7/site-packages/sphinx/errors.pyR      s   t   SphinxWarningc           B   s   e  Z d  Z d Z RS(   s   Warning, treated as error.s   Warning, treated as error(   R   R   R   R   (    (    (    s,   lib/python2.7/site-packages/sphinx/errors.pyR   )   s   t   ApplicationErrorc           B   s   e  Z d  Z d Z RS(   s!   Application initialization error.s   Application error(   R   R   R   R   (    (    (    s,   lib/python2.7/site-packages/sphinx/errors.pyR   .   s   t   ExtensionErrorc           B   s2   e  Z d  Z d Z d d  Z d   Z d   Z RS(   s   Extension error.s   Extension errorc         C   s&   t  j |  |  | |  _ | |  _ d  S(   N(   R   t   __init__t   messaget   orig_exc(   t   selfR
   R   (    (    s,   lib/python2.7/site-packages/sphinx/errors.pyR	   7   s    	c         C   s=   |  j  r& d |  j j |  j |  j  f Sd |  j j |  j f S(   Ns
   %s(%r, %r)s   %s(%r)(   R   t	   __class__R   R
   (   R   (    (    s,   lib/python2.7/site-packages/sphinx/errors.pyt   __repr__=   s    	c         C   s-   t  j |   } |  j r) d | |  j f S| S(   Ns   %s (exception: %s)(   R   t   __str__R   (   R   t
   parent_str(    (    s,   lib/python2.7/site-packages/sphinx/errors.pyR   D   s    	N(   R   R   R   R   t   NoneR	   R   R   (    (    (    s,   lib/python2.7/site-packages/sphinx/errors.pyR   3   s
   	t   BuildEnvironmentErrorc           B   s   e  Z d  Z d Z RS(   s   BuildEnvironment error.s   BuildEnvironment error(   R   R   R   R   (    (    (    s,   lib/python2.7/site-packages/sphinx/errors.pyR   L   s   t   ConfigErrorc           B   s   e  Z d  Z d Z RS(   s   Configuration error.s   Configuration error(   R   R   R   R   (    (    (    s,   lib/python2.7/site-packages/sphinx/errors.pyR   Q   s   t   DocumentErrorc           B   s   e  Z d  Z d Z RS(   s   Document error.s   Document error(   R   R   R   R   (    (    (    s,   lib/python2.7/site-packages/sphinx/errors.pyR   V   s   t
   ThemeErrorc           B   s   e  Z d  Z d Z RS(   s   Theme error.s   Theme error(   R   R   R   R   (    (    (    s,   lib/python2.7/site-packages/sphinx/errors.pyR   [   s   t   VersionRequirementErrorc           B   s   e  Z d  Z d Z RS(   s"   Incompatible Sphinx version error.s   Sphinx version error(   R   R   R   R   (    (    (    s,   lib/python2.7/site-packages/sphinx/errors.pyR   `   s   t   SphinxParallelErrorc           B   s&   e  Z d  Z d Z d   Z d   Z RS(   s   Sphinx parallel build error.s   Sphinx parallel build errorc         C   s   | |  _  | |  _ d  S(   N(   R
   t	   traceback(   R   R
   R   (    (    s,   lib/python2.7/site-packages/sphinx/errors.pyR	   j   s    	c         C   s   |  j  S(   N(   R
   (   R   (    (    s,   lib/python2.7/site-packages/sphinx/errors.pyR   o   s    (   R   R   R   R   R	   R   (    (    (    s,   lib/python2.7/site-packages/sphinx/errors.pyR   e   s   	t   PycodeErrorc           B   s   e  Z d  Z d   Z RS(   s)   Pycode Python source code analyser error.c         C   s>   |  j  d } t |  j   d k r: | d |  j  d 7} n  | S(   Ni    i   s    (exception was: %r)(   t   argst   len(   R   t   res(    (    s,   lib/python2.7/site-packages/sphinx/errors.pyR   w   s    (   R   R   R   R   (    (    (    s,   lib/python2.7/site-packages/sphinx/errors.pyR   t   s   N(   R   t   Falset   typingR    t	   ExceptionR   R   R   R   R   R   R   R   R   R   R   (    (    (    s,   lib/python2.7/site-packages/sphinx/errors.pyt   <module>   s   