o ×$•aã@sädZddlmZGdd„deƒZGdd„deƒZGdd„deƒZGd d „d eƒZGd d „d eƒZGd d„deƒZ Gdd„deƒZ Gdd„deƒZ Gdd„deƒZ Gdd„deƒZ Gdd„deƒZGdd„deƒZGdd„deƒZdS)a sphinx.errors ~~~~~~~~~~~~~ Contains SphinxError and a few subclasses (in an extra module to avoid circular import problems). :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. é)ÚAnyc@óeZdZdZdZdS)Ú 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 ú//usr/lib/python3/dist-packages/sphinx/errors.pyrsrc@r)Ú SphinxWarningzWarning, treated as error.zWarning, treated as errorNrr r r r r &ór c@r)ÚApplicationErrorz!Application initialization error.zApplication errorNrr r r r r+rrc sfeZdZdZddedededdf‡fdd„ Zedefd d „ƒZdefd d „Z def‡fd d„ Z ‡Z S)ÚExtensionErrorzExtension error.NÚmessageÚorig_excÚmodnameÚreturncs"tƒ |¡||_||_||_dS©N)ÚsuperÚ__init__rrr)Úselfrrr©Ú __class__r r r3s  zExtensionError.__init__cCs|jrd|jSdS)NzExtension error (%s)zExtension error)r©rr r r r 9s zExtensionError.categorycCs.|jrd|jj|j|jfSd|jj|jfS)Nz %s(%r, %r)z%s(%r))rrrrrr r r Ú__repr__@s ÿzExtensionError.__repr__cs"tƒ ¡}|jrd||jfS|S)Nz%s (exception: %s))rÚ__str__r)rÚ parent_strrr r rFs zExtensionError.__str__)NN) rrrr ÚstrÚ ExceptionrÚpropertyr rrÚ __classcell__r r rr r0s rc@r)ÚBuildEnvironmentErrorzBuildEnvironment error.zBuildEnvironment errorNrr r r r r#Mrr#c@r)Ú ConfigErrorzConfiguration error.zConfiguration errorNrr r r r r$Rrr$c@r)Ú DocumentErrorzDocument error.zDocument errorNrr r r r r%Wrr%c@r)Ú ThemeErrorz Theme error.z Theme errorNrr r r r r&\rr&c@r)ÚVersionRequirementErrorz"Incompatible Sphinx version error.zSphinx version errorNrr r r r r'arr'c@s8eZdZdZdZdededdfdd„Zdefd d „ZdS) ÚSphinxParallelErrorzSphinx parallel build error.zSphinx parallel build errorrÚ tracebackrNcCs||_||_dSr)rr))rrr)r r r rks zSphinxParallelError.__init__cCs|jSr)rrr r r roszSphinxParallelError.__str__) rrrr r rrrrr r r r r(fs r(c@seZdZdZdefdd„ZdS)Ú PycodeErrorz)Pycode Python source code analyser error.rcCs.|jd}t|jƒdkr|d|jd7}|S)Nréz (exception was: %r))ÚargsÚlen)rÚresr r r rvs zPycodeError.__str__N)rrrr rrr r r r r*ssr*c@óeZdZdZdS)ÚNoUriziRaised by builder.get_relative_uri() or from missing-reference handlers if there is no URI available.N©rrrr r r r r r0}sr0c@r/)ÚFiletypeNotFoundErrorz@Raised by get_filetype() if a filename matches no source suffix.Nr1r r r r r2ƒsr2N)r Útypingrr rr rrr#r$r%r&r'r(r*r0r2r r r r Ús