fddlZejrddlmZGddeZGddeeeZ Gdd e Z Gd d eZ Gd d e Z GddeZ Gdde ZGdde ZGdde Zy)N UndefinedcxeZdZdZddej eddffd Zedej efdZ xZ S) TemplateErrorz"Baseclass for all template errors.Nmessagereturnc$t||yN)super__init__)selfr __class__s Z/var/lib/jenkins/workspace/mettalog/venv/lib/python3.12/site-packages/jinja2/exceptions.pyr zTemplateError.__init__ s !c<|jr|jdSdS)Nr)argsrs rrzTemplateError.message s#yytyy|2d2rr ) __name__ __module__ __qualname____doc__tOptionalstrr propertyr __classcell__rs@rrrsD," 3"4"3C33rrceZdZUdZdZej eed< d dej ejedfdej eddfdZ defdZ y) 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 ctj|||$ddlm}t ||r|j |}||_||_|g|_y)Nrr) IOErrorr runtimer isinstance_fail_with_undefined_errorrr! templates)rr!rrs rr zTemplateNotFound.__init__sN t$ ? *$ *//1G  rc,t|jSr )rrrs r__str__zTemplateNotFound.__str__1s4<<  rr ) rrrrrrrr__annotations__Unionr r)rrr r sl $GQZZ_# $( jjk!123 C    &!!rr ceZdZdZ ddej ej edfdejeddffd 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 Nnamesrrr c0|lddlm}g}|D];}t||r|j|j+|j|=dj t t|}d|}t|%|r|dnd|t||_ y)Nrrz, z(none of the templates given were found: ) r$rr%append_undefined_messagejoinmaprr r listr')rr/rrpartsr! parts_strrs rr zTemplatesNotFound.__init__As ? *EdI.LL!8!89LL&   #c5/2I@ LG erw?er)r,N) rrrrrSequencer+rrr rrs@rr.r.5sU 8:#'%zz!''#{"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 cjt||||_||_||_d|_d|_y)NF)r r r<r!r=source translated)rrr<r!r=rs rr zTemplateSyntaxError.__init__[s7 !    '+  rc |jr$tjt|jSd|j }|j xs |j}|rd|d|}tjt|jd|zg}|jM |jj|j dz }|jd|jzdj|S#t$rYwxYw)Nzline zFile "z", z rz  )r@rcastrrr<r=r!r? splitlinesr2strip IndexErrorr4)rlocationr!lineslines rr)zTemplateSyntaxError.__str__ls ??66#t||, ,4;;-(}})  vS 3HT\\*D8O< ;; " 4{{--/ a@ Vdjjl23yy   s*C77 DDcv|j|j|j|j|jffSr )rrr<r!r=rs r __reduce__zTemplateSyntaxError.__reduce__s, ~~ dkk499dmmTTTr)NN) rrrrrintrrr r)rKrrs@rr;r;XseL !%$(    jjo  **S/    "  .Urr;ceZdZdZy)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,rrrNrNsrrNceZdZdZy)TemplateRuntimeErrorzoA generic runtime error in the template engine. Under some situations Jinja may raise this exception. NrOr,rrrQrQrrQceZdZdZy)UndefinedErrorzr]s??"3I3 !w ] !F %( %F0U-0Uf0= G)G( .r