
    ,h                         d dl Zej                  rddlmZ  G d de      Z G d deee      Z	 G d d	e	      Z
 G d
 de      Z G d de      Z G d de      Z G d de      Z G d de      Z G d de      Zy)    N   	Undefinedc                   x     e Zd ZdZddej
                  e   ddf fdZedej
                  e   fd       Z	 xZ
S )TemplateErrorz"Baseclass for all template errors.Nmessagereturnc                 $    t         |   |       y N)super__init__)selfr   	__class__s     S/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/jinja2/exceptions.pyr   zTemplateError.__init__
   s    !    c                 <    | j                   r| j                   d   S d S )Nr   )argsr   s    r   r   zTemplateError.message   s    #yytyy|2d2r   r   )__name__
__module____qualname____doc__tOptionalstrr   propertyr   __classcell__r   s   @r   r   r      sD    ,"

3 "4 " 3C 3 3r   r   c                       e Zd ZU dZdZej                  e   ed<   	 d	dej                  ej                  edf      dej                  e   ddfdZ
defdZ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.
    Nr   namer   r	   c                     t         j                  | |       |$ddlm} t	        ||      r|j                          |}|| _        || _        |g| _        y )Nr   r   )	IOErrorr   runtimer   
isinstance_fail_with_undefined_errorr   r!   	templates)r   r!   r   r   s       r   r   zTemplateNotFound.__init__   sN    
 	t$?*$	*//1G	r   c                 ,    t        | j                        S r   )r   r   r   s    r   __str__zTemplateNotFound.__str__1   s    4<<  r   r   )r   r   r   r   r   r   r   r   __annotations__Unionr   r)    r   r   r    r       sl      $GQZZ_#
 $( jjk!123  C  
	 &! !r   r    c                        e Zd ZdZ	 	 ddej
                  ej                  edf      dej                  e   ddf fdZ	 xZ
S )	TemplatesNotFounda  Like :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
    Nnamesr   r   r	   c                 0   |lddl m} g }|D ];  }t        ||      r|j                  |j                         +|j                  |       = dj                  t        t        |            }d| }t        | %  |r|d   nd |       t        |      | _        y )Nr   r   z, z(none of the templates given were found: )r$   r   r%   append_undefined_messagejoinmapr   r   r   listr'   )r   r/   r   r   partsr!   	parts_strr   s          r   r   zTemplatesNotFound.__init__A   s    
 ?*E 'dI.LL!8!89LL&	' 		#c5/2I@LGerw?er   )r,   N)r   r   r   r   r   Sequencer+   r   r   r   r   r   s   @r   r.   r.   5   sU    	 8:#'%zz!''#{"234% C% 
	% %r   r.   c                        e Zd ZdZ	 	 ddededej                  e   dej                  e   ddf
 fdZdefd	Z	d
 Z
 xZS )TemplateSyntaxErrorzBRaised to tell the user that there is a problem with the template.Nr   linenor!   filenamer	   c                 j    t         |   |       || _        || _        || _        d | _        d| _        y )NF)r   r   r<   r!   r=   source
translated)r   r   r<   r!   r=   r   s        r   r   zTemplateSyntaxError.__init__[   s7     	!	 '+  r   c                    | j                   r$t        j                  t        | j                        S d| j
                   }| j                  xs | j                  }|rd| d| }t        j                  t        | j                        d|z   g}| j                  M	 | j                  j                         | j
                  dz
     }|j                  d|j                         z          dj                  |      S # t        $ r Y w xY w)Nzline zFile "z", z  r   z    
)r@   r   castr   r   r<   r=   r!   r?   
splitlinesr2   strip
IndexErrorr4   )r   locationr!   lineslines        r   r)   zTemplateSyntaxError.__str__l   s    ??66#t||,, 4;;-(}})		vS
3HT\\*D8O< ;;"4{{--/a@ Vdjjl23yy  s   *C7 7	DDc                 v    | j                   | j                  | j                  | j                  | j                  ffS r   )r   r   r<   r!   r=   r   s    r   
__reduce__zTemplateSyntaxError.__reduce__   s,    
 ~~dkk499dmmTTTr   )NN)r   r   r   r   r   intr   r   r   r)   rK   r   r   s   @r   r;   r;   X   se    L !%$(     jjo	 
 **S/  
 "   .Ur   r;   c                       e Zd ZdZy)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.
    Nr   r   r   r   r,   r   r   rN   rN      s    r   rN   c                       e Zd ZdZy)TemplateRuntimeErrorzoA generic runtime error in the template engine.  Under some situations
    Jinja may raise this exception.
    NrO   r,   r   r   rQ   rQ          r   rQ   c                       e Zd ZdZy)UndefinedErrorz<Raised if a template tries to operate on :class:`Undefined`.NrO   r,   r   r   rT   rT      s    Fr   rT   c                       e Zd ZdZy)SecurityErrorzWRaised if a template tries to do something insecure if the
    sandbox is enabled.
    NrO   r,   r   r   rV   rV      rR   r   rV   c                       e Zd ZdZy)FilterArgumentErrorzQThis error is raised if a filter was called with inappropriate
    arguments
    NrO   r,   r   r   rX   rX      rR   r   rX   )typingr   TYPE_CHECKINGr$   r   	Exceptionr   r#   LookupErrorr    r.   r;   rN   rQ   rT   rV   rX   r,   r   r   <module>r]      s    ??"3I 3 !w]  !F %(  %F0U- 0Uf0 = G) G( . r   