R#(ddlZejrddlmZGddeZGddeeeZ Gdd e Z Gd d eZ Gd d e Z GddeZ Gdde ZGdde ZGdde ZdS)N UndefinedcveZdZdZddejeddffd ZedejefdZ xZ S) TemplateErrorz"Baseclass for all template errors.NmessagereturncJt|dSN)super__init__)selfr __class__s /srv/buildsys-work-dir/castor/build_node/builder-2/WGSG1/unpkd_srcs/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/jinja2/exceptions.pyr zTemplateError.__init__ s! !!!!!c.|jr |jdndS)Nr)argsrs rrzTemplateError.message s#y2ty||d2rr ) __name__ __module__ __qualname____doc__tOptionalstrr propertyr __classcell__rs@rrrs,,"" 3"4""""""3C333X33333rrceZdZUdZdZejeed< d dejej edfdejeddfdZ defdZ dS) TemplateNotFoundzRaised if a template does not exist. .. versionchanged:: 2.11 If the given name is :class:`Undefined` and no message was provided, an :exc:`UndefinedError` is raised. Nrnamerr ct|||,ddlm}t ||r||}||_||_|g|_dS)Nrr) IOErrorr runtimer isinstance_fail_with_undefined_errorrr! templates)rr!rrs rr zTemplateNotFound.__init__su t$$$ ? * * * * * *$ ** 2//111G  rc*t|jSr )rrrs r__str__zTemplateNotFound.__str__1s4<   rr ) rrrrrrrr__annotations__Unionr r)rrr r s $GQZ_### $(  jk!123 C       &!!!!!!!rr c|eZdZdZ d dejejedfdejeddffd Z xZ S) TemplatesNotFoundaLike :class:`TemplateNotFound` but raised if multiple templates are selected. This is a subclass of :class:`TemplateNotFound` exception, so just catching the base exception will catch both. .. versionchanged:: 2.11 If a name in the list of names is :class:`Undefined`, a message about it being undefined is shown rather than the empty string. .. versionadded:: 2.2 r,Nnamesrrr c|zddlm}g}|D]B}t||r||j-||Cdt t|}d|}t |r|dnd|t||_ dS)Nrrz, z(none of the templates given were found: ) r$rr%append_undefined_messagejoinmaprr r listr')rr/rrpartsr! parts_strrs rr zTemplatesNotFound.__init__As ? * * * * * *E ' 'dI..'LL!89999LL&&&& #c5//22ILLLG e5rw???er)r,N) rrrrrSequencer+rrr rrs@rr.r.5s  8:#'%%z!'#{"234%C%  %%%%%%%%%%rr.c |eZdZdZ d dededejedejeddf fd Zdefd Z d Z xZ S) TemplateSyntaxErrorzBRaised to tell the user that there is a problem with the template.Nrlinenor!filenamer ct|||_||_||_d|_d|_dS)NF)r r r<r!r=source translated)rrr<r!r=rs rr zTemplateSyntaxError.__init__[sF !!!    '+  rc|jrtjt|jSd|j}|jp|j}|rd|d|}tjt|jd|zg}|jc |j |jdz }| d| zn#t$rYnwxYwd |S)Nzline zFile "z", z rz  )r@rcastrrr<r=r!r? splitlinesr2strip IndexErrorr4)rlocationr!lineslines rr)zTemplateSyntaxError.__str__ls ? -6#t|,, ,)4;((})   433333HT\**D8O< ; " 4{--// a@ Vdjjll23333     yys5'C CCcD|j|j|j|j|jffSr )rrr<r!r=rs r __reduce__zTemplateSyntaxError.__reduce__s" ~ dk49dmTTTr)NN) rrrrrintrrr r)rKrrs@rr;r;XsLL !%$(     jo  *S/         "     .UUUUUUUrr;ceZdZdZdS)TemplateAssertionErrora Like a template syntax error, but covers cases where something in the template caused an error at compile time that wasn't necessarily caused by a syntax error. However it's a direct subclass of :exc:`TemplateSyntaxError` and has the same attributes. Nrrrrr,rrrNrNsrrNceZdZdZdS)TemplateRuntimeErrorzoA generic runtime error in the template engine. Under some situations Jinja may raise this exception. NrOr,rrrQrQrrQceZdZdZdS)UndefinedErrorzr]s?#""""""33333I333 ! ! ! ! !w ] ! ! !F % % % % %( % % %F0U0U0U0U0U-0U0U0Uf0= GGGGG)GGG( .r